MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
int nums[ ] = {2, 3, 5, 8, 9, 11};How would you access the fourth element in nums
A
nums[8]
B
nums[3]
C
nums(4)
D
nums(3)
Explanation: 

Detailed explanation-1: -Accessing two-dimensional arrays can be done using row index value and column index value. Name of the arrays[row index][column index];

Detailed explanation-2: -Explanation: Arrays use the length variable to determine the number of elements, making Option A correct.

Detailed explanation-3: -The elements of array InputData are INTEGERs and the indices are in the range of 0 and 100.

There is 1 question to complete.