Give the Syntax and example for initializing one dimensional array at declaration.
Answers
Answered by
5
Answer:
int a[2][3]={0,0,0,1,1,1}; initializes the elements of the first row to zero and the second row to one. The initialization is done row by row. The above statement can also be written as int a[2][3] = {{ 0,0,0},{1,1,1}}; by surrounding the elements of each row by braces.
Answered by
3
Answer:
Ex: int a[2][3]={0,0,0,1,1,1}; initializes the elements of the first row to zero and the second row to one. The initialization is done row by row. The above statement can also be written as int a[2][3] = {{ 0,0,0},{1,1,1}}; by surrounding the elements of each row by braces.
please mark me as a brainliest
Similar questions
Social Sciences,
18 days ago
Hindi,
18 days ago
Math,
1 month ago
Biology,
8 months ago
Biology,
8 months ago