

MCQOPTIONS
Saved Bookmarks
This section includes 10 Mcqs, each offering curated multiple-choice questions to sharpen your Basic C knowledge and support exam preparation. Choose a topic below to get started.
1. |
The ________________ method pads the string on left, that is, it inserts the padded characters at the beginning of string. |
A. | PadLeft |
B. | PadRight |
C. | PadFront |
D. | PadBegin |
Answer» B. PadRight | |
2. |
If the padCharacter is omitted from the syntax of the padLeft or PadRight, the default is ______________ |
A. | Space |
B. | * |
C. | / |
D. | ? |
Answer» B. * | |
3. |
____________________ and ____________________ methods are used to align characters in a String. |
A. | PadLeft, PadRight |
B. | Left, Right |
C. | LeftAlign, RightAlign |
D. | AlignLeft, AlignRight |
Answer» B. Left, Right | |
4. |
What will be in strName after the following code is executed? |
A. | Joanne C. Hashen |
B. | JoanneC.hashen |
C. | Joanne |
D. | C.HashenView Answer |
Answer» B. JoanneC.hashen | |
5. |
_____________________ method allows you to insert anywhere in the string. |
A. | Remove |
B. | Insert |
C. | Import |
D. | Delete |
Answer» C. Import | |
6. |
What will be the value of num after the following Visual Basic code is executed? |
A. | 15 |
B. | 16 |
C. | 14 |
D. | 17View Answer |
Answer» C. 14 | |
7. |
What will contain in txtFirst after the following Visual Basic code is executed? |
A. | Penny |
B. | Swanson |
C. | Penny S |
D. | y SwansonView Answer |
Answer» B. Swanson | |
8. |
_______________________ method is used to remove specified number of characters located anywhere in the String. |
A. | Trim |
B. | Remove |
C. | Truncate |
D. | DeleteSpace |
Answer» C. Truncate | |
9. |
_______________ method is used to remove space from beginning and end of a string. |
A. | Trim |
B. | Remove |
C. | Truncate |
D. | DeleteSpace |
Answer» B. Remove | |
10. |
The number of characters contained in a String is stored as Integer in String’s ____________ |
A. | Substring property |
B. | Length property |
C. | Reverse property |
D. | Index property |
Answer» C. Reverse property | |