Advertisements
Advertisements
Question
The following statement : int code[ ]= {25, 37, 38, 42);
Options
Assigns 37 to code[1]
Assigns 25 to code[1]
Assigns 38 to code[3]
Assigns 42 to code[0]
MCQ
Solution
Assigns 37 to code[1]
Explanation:
The statement int code[ ]= {25, 37, 38, 42};
assigns 37 to code[1] as the array index begins from 0. So the second value (37) will be assigned to code[1].
shaalaa.com
Is there an error in this question or solution?