C Programming 100 MCQs 1D Array
C Programming 100 MCQs 1D Array
Questions:
arr[2] = 4;
printf("%d", arr[2]);
(a) 4
(b) 0
(a) arr[3]
(b) arr[4]
(c) arr[2]
(d) arr[5]
(a) 1
(b) 2
(c) 3
(d) 0
arr[7] = 14;
printf("%d", arr[7]);
(a) 14
(b) 0
(a) arr[8]
(b) arr[9]
(c) arr[7]
(d) arr[10]
printf("%d", arr[4]);
(a) 1
(b) 2
(c) 3
(d) 0
11. Which of the following is the correct way to declare a 1D array of 11 integers?
arr[2] = 24;
printf("%d", arr[2]);
(a) 24
(b) 0
(a) arr[3]
(b) arr[4]
(c) arr[2]
(d) arr[5]
printf("%d", arr[4]);
(a) 1
(b) 2
(c) 3
(d) 0
16. Which of the following is the correct way to declare a 1D array of 16 integers?
arr[7] = 34;
printf("%d", arr[7]);
(a) 34
(b) 0
(a) arr[8]
(b) arr[9]
(c) arr[7]
(d) arr[10]
printf("%d", arr[4]);
(a) 1
(b) 2
(c) 3
(d) 0
21. Which of the following is the correct way to declare a 1D array of 21 integers?
arr[2] = 44;
printf("%d", arr[2]);
(a) 44
(b) 0
(a) arr[3]
(b) arr[4]
(c) arr[2]
(d) arr[5]
printf("%d", arr[4]);
(a) 1
(b) 2
(c) 3
(d) 0
26. Which of the following is the correct way to declare a 1D array of 26 integers?
arr[7] = 54;
printf("%d", arr[7]);
(a) 54
(b) 0
(a) arr[8]
(b) arr[9]
(c) arr[7]
(d) arr[10]
printf("%d", arr[4]);
(a) 1
(b) 2
(c) 3
(d) 0
31. Which of the following is the correct way to declare a 1D array of 31 integers?
arr[2] = 64;
printf("%d", arr[2]);
(a) 64
(b) 0
(c) Compilation error
(a) arr[3]
(b) arr[4]
(c) arr[2]
(d) arr[5]
printf("%d", arr[4]);
(a) 1
(b) 2
(c) 3
(d) 0
36. Which of the following is the correct way to declare a 1D array of 36 integers?
arr[7] = 74;
printf("%d", arr[7]);
(a) 74
(b) 0
(a) arr[8]
(b) arr[9]
(c) arr[7]
(d) arr[10]
printf("%d", arr[4]);
(a) 1
(b) 2
(c) 3
(d) 0
arr[2] = 84;
printf("%d", arr[2]);
(a) 84
(b) 0
(a) arr[3]
(b) arr[4]
(c) arr[2]
(d) arr[5]
printf("%d", arr[4]);
(a) 1
(b) 2
(c) 3
(d) 0
46. Which of the following is the correct way to declare a 1D array of 46 integers?
arr[7] = 94;
printf("%d", arr[7]);
(a) 94
(b) 0
(a) arr[8]
(b) arr[9]
(c) arr[7]
(d) arr[10]
printf("%d", arr[4]);
(a) 1
(b) 2
(c) 3
(d) 0
51. Which of the following is the correct way to declare a 1D array of 51 integers?
arr[2] = 104;
printf("%d", arr[2]);
(a) 104
(b) 0
(a) arr[3]
(b) arr[4]
(c) arr[2]
(d) arr[5]
printf("%d", arr[4]);
(a) 1
(b) 2
(c) 3
(d) 0
56. Which of the following is the correct way to declare a 1D array of 56 integers?
printf("%d", arr[7]);
(a) 114
(b) 0
(a) arr[8]
(b) arr[9]
(c) arr[7]
(d) arr[10]
printf("%d", arr[4]);
(a) 1
(b) 2
(c) 3
(d) 0
61. Which of the following is the correct way to declare a 1D array of 61 integers?
arr[2] = 124;
printf("%d", arr[2]);
(a) 124
(b) 0
(a) arr[3]
(b) arr[4]
(c) arr[2]
(d) arr[5]
printf("%d", arr[4]);
(a) 1
(b) 2
(c) 3
(d) 0
66. Which of the following is the correct way to declare a 1D array of 66 integers?
arr[7] = 134;
printf("%d", arr[7]);
(a) 134
(b) 0
(a) arr[8]
(b) arr[9]
(c) arr[7]
(d) arr[10]
(a) 1
(b) 2
(c) 3
(d) 0
71. Which of the following is the correct way to declare a 1D array of 71 integers?
arr[2] = 144;
printf("%d", arr[2]);
(a) 144
(b) 0
(a) arr[3]
(b) arr[4]
(c) arr[2]
(d) arr[5]
printf("%d", arr[4]);
(a) 1
(b) 2
(c) 3
(d) 0
76. Which of the following is the correct way to declare a 1D array of 76 integers?
arr[7] = 154;
printf("%d", arr[7]);
(a) 154
(b) 0
(a) arr[8]
(b) arr[9]
(c) arr[7]
(d) arr[10]
printf("%d", arr[4]);
(a) 1
(b) 2
(c) 3
(d) 0
81. Which of the following is the correct way to declare a 1D array of 81 integers?
arr[2] = 164;
printf("%d", arr[2]);
(a) 164
(b) 0
(a) arr[3]
(b) arr[4]
(c) arr[2]
(d) arr[5]
printf("%d", arr[4]);
(a) 1
(b) 2
(c) 3
(d) 0
86. Which of the following is the correct way to declare a 1D array of 86 integers?
arr[7] = 174;
printf("%d", arr[7]);
(a) 174
(b) 0
(a) arr[8]
(b) arr[9]
(c) arr[7]
(d) arr[10]
printf("%d", arr[4]);
(a) 1
(b) 2
(c) 3
(d) 0
91. Which of the following is the correct way to declare a 1D array of 91 integers?
arr[2] = 184;
printf("%d", arr[2]);
(a) 184
(b) 0
(a) arr[3]
(b) arr[4]
(c) arr[2]
(d) arr[5]
printf("%d", arr[4]);
(a) 1
(b) 2
(c) 3
(d) 0
96. Which of the following is the correct way to declare a 1D array of 96 integers?
arr[7] = 194;
printf("%d", arr[7]);
(a) 194
(b) 0
(c) Compilation error
(a) arr[8]
(b) arr[9]
(c) arr[7]
(d) arr[10]
printf("%d", arr[4]);
(a) 1
(b) 2
(c) 3
(d) 0
2. (a) 4
3. (a) arr[3]
4. (d) 0
7. (a) 14
8. (a) arr[8]
9. (d) 0
14. (d) 0
17. (a) 34
19. (d) 0
22. (a) 44
27. (a) 54
29. (d) 0
32. (a) 64
34. (d) 0
37. (a) 74
39. (d) 0
42. (a) 84
44. (d) 0
47. (a) 94
49. (d) 0
54. (d) 0
59. (d) 0
64. (d) 0
69. (d) 0
74. (d) 0
79. (d) 0
89. (d) 0
94. (d) 0
99. (d) 0