Array MCQ Questions And Answers
Array MCQs : This section focuses on "Array" in Pl/Sql. These Multiple Choice Questions (MCQ) should be practiced to improve the Pl/Sql skills required for various interviews (campus interview, walk-in interview, company interview), placements, entrance exams and other competitive examinations.
1. The PL/SQL programming language provides a data structure called the ________.
A. ARRAY
B. MARRAY
C. VARRAY
D. DARRAY
View Answer
Ans : C
Explanation: The PL/SQL programming language provides a data structure called the VARRAY.
2. A varray is used to store an ordered collection of data.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: True, A varray is used to store an ordered collection of data
3. A varray type is created with the _________ statement.
A. REPLACE TYPE
B. CREATE TYPE
C. ELEMENT TYPE
D. ALTER TYPE
View Answer
Ans : B
Explanation: A varray type is created with the CREATE TYPE statement.
4. varray_type_name is a valid attribute name,
A. Yes
B. No
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: Yes, varray_type_name is a valid attribute name,
5. The _________ corresponds to the first element.
A. middle address
B. highest address
C. lowest address
D. None of the above
View Answer
Ans : C
Explanation: The lowest address corresponds to the first element and the highest address to the last element.
6. Varrays are ___________ arrays.
A. one-dimensional
B. two-dimensional
C. multi-dimensional
D. None of the above
View Answer
Ans : A
Explanation: Varrays are one-dimensional arrays.
7. A varray is automatically _______.
A. blank
B. zero
C. one
D. null
View Answer
Ans : A
Explanation: A varray is automatically NULL when it is declared and must be initialized before its elements can be referenced.
8. All varrays consist of ___________ memory locations.
A. simple
B. contiguous
C. linear
D. None of the above
View Answer
Ans : B
Explanation: All varrays consist of contiguous memory locations.
9. What is TRUE about PL/SQL functionalities?
A. Conditions and loops are fundamental elements of procedural languages like PL/SQL.
B. Various types and variables can be declared, as can procedures and functions, as well as types and variables of those types
C. Arrays can be used with it as well as handling exceptions (runtime errors)
D. All of the above
View Answer
Ans : D
Explanation: All of the above are true about PL/SQL functionalities.
10. Maximum size of a varray can be changed using the __________ statement.
A. REPLACE TYPE
B. CREATE TYPE
C. ALTER TYPE
D. ELEMENT TYPE
View Answer
Ans : C
Explanation: Maximum size of a varray can be changed using the ALTER TYPE statement.
Discussion