What is the highest legal index for the following array? int arr[4]
- A4
- B3
- C2
- D1
Indexes run from 0 to size-1, so the last index is 3.
MCQs, short and long questions from lecture 11.Lecture 11 ki MCQs, short aur long sawal.
4 MCQs · 4 MCQs from past papers4 MCQs · 4 MCQs past papers se
What is the highest legal index for the following array? int arr[4]
Indexes run from 0 to size-1, so the last index is 3.
Which of the following syntax will be used to initialize an array of size 5 of int data type to value 0?
An initializer list {0} sets the first element to 0 and the remaining elements are zero-initialized; the declaration needs the type.
In C/C++ if we define an array of size eight (8) i.e. int Arr [8]; then the last element of this array will be stored at,
Indexes start at 0, so the last of 8 elements is Arr[7].
Suppose a program contains an array declared as int arr[100]; what will be the size of array?
The declared size is 100 elements (indexes 0 to 99).
No MCQs match this filter.Is filter mein koi MCQ nahi.
No short questions added yet.Abhi koi short sawal shamil nahi.
No long questions added yet.Abhi koi long sawal shamil nahi.