C Programming Multiple Choice Question - Array And String

This section focuses on the "Array And String" of the C programming. These Multiple Choice Questions (mcq) should be practiced to improve the C programming skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

1. What is the maximun number of dimensions an array in C may have?

A. Two
B. eight
C. sixteen
D. Theoratically no limit. The only practical limits are memory size and compilers

View Answer

2.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

View Answer

3. 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 starting address of the array is 2000?

A. 2048
B. 2056
C. 2052
D. 2042

View Answer

4. Array can be considered as set of elements stored in consecutive memory locations but having __________.

A. Same data type
B. Different data type
C. Same scope
D. None of these

View Answer

5.Array is an example of _______ type memory allocation.

A. Compile time
B. Run time

View Answer

6. Size of the array need not be specified, when

A. Initialization is a part of definition
B. It is a formal parameter
C. It is a declaratrion
D. All of the above

View Answer

7. The information about an array used in program will be stored in

A. Symbol Table
B. Activation Record
C. Dope Vector
D. Both A and B

View Answer

8. The parameter passing mechanism for an array is

A. call by value
B. call by reference
C. call by value-result
D. None of the above

View Answer

9. A string that is a formal parameter can be declared

A. An array with empty braces
B. A pointer to character
C. Both A and B
D. None of the above

View Answer

10. Which of the following function is more appropriate for reading in a multi-word string?

A. scanf()
B. printf()
C. gets()
D. puts()

View Answer

Also check :


* You must be logged in to add comment.