A two-dimensional array in C is declared as:
A
int a[3,4];
B
int a[3][4];
Correct answer
C
int a(3,4);
D
int a{3,4};
Correct answer
B. int a[3][4];
12 views
⚔️
Challenge a friend on Computer Science FBISE Class 10
Same MCQs, timed, live leaderboard. Send the link on WhatsApp – no sign-up needed.
Create challenge
Explanation
int a[3][4]; declares a 2D array with 3 rows and 4 columns. The first index is rows, the second is columns. 2D arrays are used for tables and matrices.
Reference
Asked in: Matric,FBISE
Doubts & discussionNot sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ
‹ Previous MCQ Which of these is a relational operator? Next MCQ › The output of the following loop is: for(int i=0; i<3; i++) printf("%d", i);