Explore topic-wise MCQs in Unix.

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.

Which symbol is used for finding the length of the string?

A. .
B. *
C. .*
D. .*.
Answer» D. .*.
2.

The string to be worked upon is placed on the left of the colon when using expr string handling function.

A. True
B. False
Answer» B. False
3.

Which of the following is performed by expr string handling’s function?

A. determine the length of string
B. extract a substring
C. locate the position of a character in a string
D. determine the length of string, extract and locate the position of the string
Answer» E.
4.

expr can perform ____ arithmetic operations.

A. 2
B. 4
C. 5
D. 3
Answer» D. 3
5.

WHICH_OF_THE_FOLLOWING_IS_PERFORMED_BY_EXPR_STRING_HANDLING‚ÄÖ√Ñ√∂‚ÀÖ√Ë‚ÀÖ¬•S_FUNCTION??$#

A. determine the length of string
B. extract a substring
C. locate the position of a character in a string
D. determine the length of string, extract and locate the position of the string
Answer» E.
6.

Which symbol is used for finding the length of the string?$

A. .
B. *
C. .*
D. .*.
Answer» D. .*.
7.

The_string_to_be_worked_upon_is_placed_on_the_left_of_the_colon_when_using_expr_string_handling_function.$

A. True
B. False
Answer» B. False
8.

expr is a _____ command

A. internal
B. external
C. shell
D. derived
Answer» C. shell
9.

For locating the first position of a character in a string we can use expr command.

A. True
B. False
Answer» B. False
10.

Which of the following pattern is used for extracting a substring using expr?

A. /( )
B. \(. .\)
C. . .\)
D. \\(
Answer» C. . .\)
11.

expr can perform ____ arithmetic operations?

A. 2
B. 4
C. 5
D. 3
Answer» D. 3
12.

Which command is used for computation and string handling?

A. expr
B. case
C. if
D. read
Answer» B. case
13.

case can also use wildcards to pattern matching.

A. True
B. False
Answer» B. False
14.

case can also be used for matching multiple patterns.

A. True
B. False
Answer» B. False
15.

The ___ option in case statement matches any option not matched by the previous options.

A. ^
B. $
C. *
D. //
Answer» D. //
16.

case statement should have a corresponding closing esac.

A. True
B. False
Answer» B. False
17.

Every pattern in case statement in terminated with a _____

A. ;
B. :
C. ;;
D. //
Answer» D. //
18.

____ statement matches an expression for more than one alternative.

A. for
B. while
C. elif
D. case
Answer» E.