Question discussion

What does the first dimension and the second dimension represents in a two-dimensional character array?

359244Medium DSSSB TGT Computer Science 0 replies 0 views
0
What does the first dimension and the second dimension represents in a two-dimensional character array?
  • AThe first dimension stores the length of each name, and the second stores the number of names.
  • BThe first dimension represents the number of names in the array, and the second dimension represents the maximum length of each name.
  • CThe first dimension represents the maximum length of the names, and the second dimension represents the number of names.
  • DThe first dimension holds the total number of characters, and the second dimension stores the number of names.
Correct answer: B

Explanation

In a 2D character array of names, the first dimension is the number of names and the second is the maximum length of each name.

Discussion 0

Nobody has replied yet. Start the discussion!