C++ Array Solved MCQs Questions Answers

Let us see the C++ Array Solved MCQs Questions Answers.

1. The array can be described as?
A. Data structure
B. A container having similar values
C. Not a data structure
D. None of these
Answer: B

2. Syntax to initialize an array in C is?
A. int arr[3]={1,2,3};
B. int arr(3)=(1,2,3);
C. int arr{3}=[1,2,3];
D. All of these
Answer: A

3.Advantage of an array is?
A. Stores Element
B. index of the element is 1
C. Stores many elements with the same data type
D. None of these
Answer: C

4. Index of an array starts with?
A. 1
B. 2
C. 3
D. 0
Answer: D

5. Arrays elements can be accessed?
A. Exponentially
B. Logarithmically
C. Randomly
D. Both B and C
Answer: C

6. Dimensions of an array in C are?
A. 2
B. 3
C. 4
D. No limit
Answer: D

7. Data types of the array include?
A. int
B. float
C. char, double, struct
D. All of these
Answer: D

8. The function called to passed the entire array?
A. Call by reference
B. Call by value
C. Both A and B
D. None of these
Answer: A

9. To read the multi-word string we use the function?
A. puts()
B. gets()
C. scanf()
D. All of these
Answer: B

10. What do we use to access the seven-element of an array?
A. arr[6]
B. arr[7]
C. Both A and B
D. arr{7}
Answer: A

11. int a[5]={1,3,2}. What will be the value of a[4]?
A. 3
B. 2
C. 0
D. Garbage value
Answer: A

12. The sequence of objects having the same data type, is called?
A. Stacks
B. Functions
C. Arrays
D. None of these
Answer: C

13. The object of an array is?
A. Functions of array
B. Elements of array
C. Indexes of array
D. None of these
Answer: B

14. In a binary search, we use an algorithm called?
A. Bubble sort
B. Liner way
C. Both A and B
D. Divide and conquer
Answer: D

15. Size of an Array does not required, when?
A. It is a declaration
B. Initialization is part of the definition
C. Both A and B
D. It is a formal parameter
Answer: B

16. Operator use to allocates memory to array variable in java?
A. New
B. New malloc
C. Alloc
D. Malloc
Answer: A

17. What is the index of the last element having 9 elements?
A. 7
B. 9
C. 8
D. 0
Answer: C

18. Arr[6] access which element stored in an array?
A. 6
B. 7
C. 0
D. 5
Answer: D

19. What is the length of array {1,3,4,2,4}
A. 5
B. 4
C. 3
D. None of these
Answer: B

20. Referring element outside from array bound?
A. Logical error
B. Execution time error
C. Both B and C
D. Syntax error
Answer: C

21. One dimension array of one-dimensional arrays is called?
A. Two dimensional array
B. One dimensional array
C. Multi casting array
D. None of these
Answer:

Answer - Click Here:
A

More Array MCQs

Programming C Plus Plus MCQs Homepage

shamil memory table

Computer Science Repeated MCQs Book Download