Question discussion

Which of the following statements declares a one-dimensional array named item that consists of five elements ?

2944Medium DSSSB TGT Computer Science 0 replies 2 views
0

Which of the following statements declares a one-dimensional array named item that consists of five elements ?

  • Acharitem[0 to 4)=" ";
  • Bcharitem={1, 2, 3, 4}
  • Ccharitem=' ';
  • Dcharitem[5]=" ";
Correct answer: D

Explanation

Only the last form, with size 5, declares a five-element array.

Discussion 0

Nobody has replied yet. Start the discussion!