PIC Unit4 MCQ
PIC Unit4 MCQ
PIC Unit4 MCQ
Answer: b
Answer: c
main()
printf("cwipedia");
main();
a) Wrong statement
Answer: b
c) Input data
d) Output data
Answer: a
5. Array elements are always stored in ______ memory locations.
a) Random
b) Sequential
Answer: a
a) 2
b) 3
c) 12
d) No Limit
Anser: d
I. ++x
II. x+1
III. x++
IV. x*2
a) I and II
b) I, II and III
c) II and III
d) I, III and IV
Answer: d
8. What will be the output of the program if the array begins at 1000 and each integer
occupies 2 bytes?
void main() {
a) 1004 1008
b) 1002 1008
c) 1002 1002
d) 1008 1002
Answe:a
Answer: d
10. What are the disadvantages of arrays?
b) There are chances of wastage of memory space if elements inserted in an array are lesser
than the allocated size
Answer: b
A. Two
B. eight
C. sixteen
D. Theoretically no limit. The only practical limits are memory size and compilers
Ans : D
12. A one dimensional array A has indices 1....75. Each element is a string and takes up three
memory words. The array is stored at location 1120 decimal. The starting address of A[49] is
A. 1264
B. 1164
C. 1167
D. 1267
Ans : A
13. What will be the address of the arr[2][3] if arr is a 2-D long array of 4 rows and 5
columns and the starting address of the array is 2000?
A. 2048
B. 2056
C. 2052
D. 2042
Ans : C
14. Arrays can be considered as a set of elements stored in consecutive memory locations but
having __________.
A. Compile time
B. Run time
C. Both A and B
D. None of the above
View Answer
Ans : A
A. Symbol Table
B. Activation Record
C. Dope Vector
D. Both A and B
Ans : C
A. call by value
B. call by reference
C. call by value-result
D. None of the above
Ans : B
20. Which of the following functions is more appropriate for reading in a multi-word string?
A. scanf()
B. printf()
C. gets()
D. puts()
View Answer
Ans : C
Happy Learning!
cwipedia.in