Explore topic-wise MCQs in Automata Theory.

This section includes 16 Mcqs, each offering curated multiple-choice questions to sharpen your Automata Theory knowledge and support exam preparation. Choose a topic below to get started.

1.

Which of the following does not support regular expressions?

A. sed
B. awk
C. emacs
D. none of the mentioned
Answer» E.
2.

What does “X?” do regular expression operator?

A. Matches zero or more capital X’s.
B. Matches no or one occurence of the capital letter X.
C. Matches one or more capital X’s.
D. All of the mentioned
Answer» C. Matches one or more capital X’s.
3.

What does the following segment of code does?grep -i man heroes.txt

A. manually opens a file called heroes.txt
B. manages heroes.txt
C. search for “man” in the file “heroes.txt”
D. none of the mentioned
Answer» D. none of the mentioned
4.

Which of the following options support the given statement?Statement: A regular expression could be a fixed word or describe something like more general.a) This flexibility makes Regular expression invaluable.b) This flexibility makes the Regular expression unvaluable.c) Both (

A. This flexibility makes Regular expression invaluable.b) This flexibility makes the Regular expression unvaluable.c) Both (a) and (
B. This flexibility makes the Regular expression unvaluable.
C. Both (a) and (b)
D. None of the mentioned
Answer» B. This flexibility makes the Regular expression unvaluable.
5.

State true or false:Statement: A regular expression is a sequence of characters that represent a pattern.

A. true
B. false
Answer» B. false
6.

What does grep do in UNIX?a) It is an editor in UNIXb) It searches for text patternsc) Both (

A. It is an editor in UNIXb) It searches for text patternsc) Both (a) and (
B. It searches for text patterns
C. Both (a) and (b)
D. None of the mentioned
Answer» C. Both (a) and (b)
7.

For the given syntax of sed, which among the following is not a correct option?General syntax of sed: /pattern/action

A. / are used as delimiters
B. pattern refers to a regular expression
C. pattern refers to the string to be matched
D. action refers to the command
Answer» D. action refers to the command
8.

WHAT_DOES_‚ÄÖ√Ñ√∂‚ÀÖ√Ë‚ÀÖ‚À´X?‚ÄÖ√Ñ√∂‚ÀÖ√Ë‚ÀÖŒÄ_DO_REGULAR_EXPRESSION_OPERATOR??$#

A. Matches zero or more capital X’s.
B. Matches no or one occurence of the capital letter X.
C. Matches one or more capital X’s.
D. All of the mentioned
Answer» C. Matches one or more capital X‚Äö√Ñ√∂‚àö√ë‚àö¬•s.
9.

Which_of_the_following_does_not_support_regular_expressions?$

A. sed
B. awk
C. emacs
D. none of the mentioned
Answer» E.
10.

What does the following segment of code does?

A.
B. manually opens a file called heroes.txt
C. manages heroes.txt
Answer» D.
11.

Which of the following options support the given statement?

A.
B. This flexibility makes Regular expression invaluable.
C. This flexibility makes the Regular expression unvaluable.
Answer» B. This flexibility makes Regular expression invaluable.
12.

What does grep do in UNIX?

A. It is an editor in UNIX
B. It searches for text patterns
C. Both (a) and (b)
D. None of the mentioned
Answer» C. Both (a) and (b)
13.

For the given syntax of sed, which among the following is not a correct option?

A.
B. / are used as delimiters
C. pattern refers to a regular expression
Answer» D.
14.

Generate the regular expression to match blank lines

A. / */
B. /bl
C. /^?/
D. /^$/
Answer» E.
15.

What is the significance of $ used in regular expression in UNIX?

A. Matches the beginning of the line
B. Matches the end of lines
C. Matches any single character
D. None of the mentioned
Answer» C. Matches any single character
16.

Which among the following is not a UNIX command for regular expressions?

A. ed
B. sed
C. vi
D. none of the mentioned
Answer» E.