MCQOPTIONS
Saved Bookmarks
This section includes 18 Mcqs, each offering curated multiple-choice questions to sharpen your Unix knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
TO_REPEAT_A_STRING,_PERL_USES_____OPERATOR.?$ |
| A. | / |
| B. | . |
| C. | x |
| D. | \\ |
| Answer» D. \\ | |
| 2. |
WHICH_OF_THE_FOLLOWING_ARE_CONCATENATION_OPERATORS??$ |
| A. | / |
| B. | . |
| C. | _ |
| D. | \\ |
| Answer» C. _ | |
| 3. |
___ function returns the first occurrence of a character in a string.$ |
| A. | string |
| B. | index |
| C. | split |
| D. | length |
| Answer» C. split | |
| 4. |
Which function is used by perl for displaying the length of a string?$ |
| A. | string |
| B. | len |
| C. | split |
| D. | length |
| Answer» E. | |
| 5. |
We can use find command for testing files with perl. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 6. |
Which escape character is used for identifying a word character? |
| A. | \s |
| B. | \d |
| C. | \w |
| D. | \n |
| Answer» D. \n | |
| 7. |
Which function is used for handling substitutions in perl? |
| A. | tr |
| B. | s |
| C. | str |
| D. | tr and s |
| Answer» E. | |
| 8. |
Which function is used by perl for reversing a string? |
| A. | rev |
| B. | reverse |
| C. | split |
| D. | substr |
| Answer» C. split | |
| 9. |
substr function is also used to alter an existing string. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 10. |
For extracting a substring, ____ function is used. |
| A. | string |
| B. | index |
| C. | substr |
| D. | length |
| Answer» D. length | |
| 11. |
If a variable is undefined, its value is ___? |
| A. | 0 |
| B. | 1 |
| C. | NULL |
| D. | garbage |
| Answer» B. 1 | |
| 12. |
When a string is used for numeral computations, perl converts it into ___ |
| A. | character |
| B. | floating point number |
| C. | number |
| D. | boolean value |
| Answer» D. boolean value | |
| 13. |
perl variables have no type and no initialization. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 14. |
___ function is used for removing the last character from the line. |
| A. | cut |
| B. | chop |
| C. | erase |
| D. | split |
| Answer» C. erase | |
| 15. |
It is often more convenient to save perl program files with ____ extension. |
| A. | .gp |
| B. | .sh |
| C. | .awk |
| D. | .pl |
| Answer» E. | |
| 16. |
To test whether perl is in your PATH, use ____ |
| A. | perl -e |
| B. | perl -i |
| C. | perl -el |
| D. | perl -ed |
| Answer» B. perl -i | |
| 17. |
A perl program runs in a special interpretive mode. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 18. |
Which one of the following is the most powerful filter? |
| A. | awk |
| B. | grep |
| C. | sed |
| D. | perl |
| Answer» E. | |