1
1
Which of the following statements are correct about an array?1. The array int num[26]; can store 26 elements.2. The expression num[1] designates the very first element in the array.3. It is necessary to initialize the array at the time of declaration.4. T
Which of the following statements are correct about an array?1. The array int num[26]; can store 26 elements.2. The expression num[1] designates the very first element in the array.3. It is necessary to initialize the array at the time of declaration.4. The declaration num[SIZE] is allowed if SIZE is a macro.
A). 1
B). 1, 4
C). 2, 3
D). 2, 4
E). None of these
This Question has 1 answers.
1, 4
1. The array int num[26]; can store 26 elements. This statement is true.
2. The expression num[1] designates the very first element in the array. This statement is false, because it designates the second element of the array.
3. It is necessary to initialize the array at the time of declaration. This statement is false.
4. The declaration num[SIZE] is allowed if SIZE is a macro. This statement is true, because the MACRO just replaces the symbol SIZE with given value.
Hence the statements '1' and '4' are correct statements.
Similar Questions
- There are three taps A, B and C in a tank. They can fill the tank in 25 hrs, 20 hrs and 10 hrs respectively. At first all of them are opened simultaneously. Then after 1 hrs, tap C is closed and tap A and B are kept running. After the 4th hour, tap B is a
- In an alloy, zinc and copper are in the ratio 1 : 2. In the second alloy, the same elements are in the ratio 2 : 3. If these two alloys be mixed to form a new alloy in which two elements are in the ratio 5:8, the ratio of these two alloys in the new allow
- In a hotel, the rooms are numbered from 101 to 130 on the first floor, 221 to 260 on the second floor and 306 to 345 on the third floor. In the month of June this year, the room occupancy was 60% on the first floor, 40% on the second floor and 75% on the
- Two towns P & Q are 275 km apart. A motorcycle rider starts from P towards Q at 8 a.m. at the speed of 25 km/hr. Another rider starts from Q towards P at 9 a.m. at the speed of 20 km/hr. Find at what time they will cross each other?
- There is a circular path around a sports field. Sonia takes 18 minutes to drive one round of the field, while Ravi takes 12 minutes for the same. Suppose they both start at the same point and at the same time, and go in the same direction. After how many