A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

11. The memory address of fifth element of an array can be calculated by the formula
a. LOC(Array[5]=Base(Array)+w(5-lower bound), where w is the number of words per memory cell for the array
b. LOC(Array[5])=Base(Array[5])+(5-lower bound), where w is the number of words per memory cell for the array
c. LOC(Array[5])=Base(Array[4])+(5-Upper bound), where w is the number of words per memory cell for the array
d. None of above
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).LOC(Array[5]=Base(Array)+w(5-lower bound), where w is the number of words per memory cell for the array

12. Two dimensional arrays are also called
a. tables arrays
b. matrix arrays
c. both of above
d. none of above
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).both of above

13. A variable P is called pointer if
a. P contains the address of an element in DATA
b. P points to the address of first element in DATA
c. P can store only memory addresses
d. P contain the DATA and the address of DATA
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).P contains the address of an element in DATA

14. What is right way to Initialize array?
a. int num[6] = { 2, 4, 12, 5, 45, 5 };
b. int n{} = { 2, 4, 12, 5, 45, 5 };
c. int n{6} = { 2, 4, 12 };
d. int n(6) = { 2, 4, 12, 5, 45, 5 };
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).int num[6] = { 2, 4, 12, 5, 45, 5 };

15. An array elements are always stored in ________ memory locations.
a. Sequential
b. Random
c. Sequential and Random
d. None of the above
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).Sequential

16. Size of the array need not be specified, when
a. Initialization is a part of definition
b. It is a declaratrion
c. It is a formal parameter
d. All of these
View Answer Report Discuss Too Difficult! Search Google
Answer: (d). All of these

17. What does the following declaration mean?

int (*ptr)[10];
a. ptr is array of pointers to 10 integers
b. ptr is a pointer to an array of 10 integers
c. ptr is an array of 10 integers
d. ptr is an pointer to array
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).ptr is a pointer to an array of 10 integers

18. Array passed as an argument to a function is interpreted as
a. Address of the array.
b. Values of the first elements of the array.
c. Address of the first element of the array.
d. Number of element of the array.
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).Address of the first element of the array.

19. Which of the following correctly accesses the seventh element stored in arr, an array with 100 elements?
a. arr[6]
b. arr[7]
c. arr{6}
d. arr{7}
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).arr[6]

20. The smallest element of an array’s index is called its
a. lower bound
b. upper bound
c. range
d. extraction
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).lower bound

Page 2 of 14