Strings MCQ Questions And Answers
Strings MCQs : This section focuses on "Strings" 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. PL/SQL offers __________ kinds of strings.
A. 1
B. 2
C. 3
D. 4
View Answer
Ans : C
Explanation: PL/SQL offers three kinds of strings : Fixed-length strings, Variable-length strings and Character large objects.
2. Which type of string has a maximum length up to 32,767?
A. Fixed-length strings
B. Variable-length strings
C. Character large objects
D. All of the above
View Answer
Ans : B
Explanation: Variable-length strings : In such strings, a maximum length up to 32,767, for the string is specified and no padding takes place.
3. PL/SQL strings could be?
A. variables
B. literals
C. Both A and B
D. None of the above
View Answer
Ans : C
Explanation: PL/SQL strings could be either variables or literals.
4. A string literal is enclosed within __________.
A. dollar sign
B. hashtag
C. angle brackets
D. quotation marks
View Answer
Ans : D
Explanation: A string literal is enclosed within quotation marks.
5. The datatypes prefixed with an N are ___________ datatypes
A. national character set
B. fixed character set
C. variable character set
D. simple character set
View Answer
Ans : A
Explanation: The datatypes prefixed with an N are national character set datatypes, that store Unicode character data.
6. CHR(x); function return?
A. the ASCII value of the character
B. the character with the ASCII value
C. Converts the initial letter of each word
D. Returns the location of a string
View Answer
Ans : B
Explanation: CHR(x); Returns the character with the ASCII value of x.
7. Fixed-length strings programmers specify the length while declaring the string.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: True, Fixed-length strings programmers specify the length while declaring the string.
8. Which function converts the initial letter of each word in x to uppercase and returns that string.
A. ASCII(x);
B. INSTRB(x);
C. INITCAP(x);
D. LENGTH(x);
View Answer
Ans : C
Explanation: INITCAP(x); Converts the initial letter of each word in x to uppercase and returns that string.
9. __________are values which do not have an identifier and are numeric, character, string, or boolean.
A. Constants
B. Literals
C. Cursor
D. Variables
View Answer
Ans : B
Explanation: Literals are values which do not have an identifier and are numeric, character, string, or Boolean.
10. Character large objects (CLOBs) is a variable-length strings that can be up to 128 terabytes.
A. Yes
B. No
C. Can be yes or no
D. Can not say
View Answer
Ans : A
Explanation: Yes, Character large objects (CLOBs) is a variable-length strings that can be up to 128 terabytes.
Discussion