Test: Regular Expression - Computer Science Engineering (CSE) MCQ

# Test: Regular Expression - Computer Science Engineering (CSE) MCQ

Test Description

## 15 Questions MCQ Test Compiler Design - Test: Regular Expression

Test: Regular Expression for Computer Science Engineering (CSE) 2024 is part of Compiler Design preparation. The Test: Regular Expression questions and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus.The Test: Regular Expression MCQs are made for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Test: Regular Expression below.
Solutions of Test: Regular Expression questions in English are available as part of our Compiler Design for Computer Science Engineering (CSE) & Test: Regular Expression solutions in Hindi for Compiler Design course. Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free. Attempt Test: Regular Expression | 15 questions in 15 minutes | Mock test for Computer Science Engineering (CSE) preparation | Free important questions MCQ to study Compiler Design for Computer Science Engineering (CSE) Exam | Download free PDF with solutions
 1 Crore+ students have signed up on EduRev. Have you?
Test: Regular Expression - Question 1

### A regular expression enables a quick test to determine objects and text strings with undependable values.

Detailed Solution for Test: Regular Expression - Question 1

Explanation: Because it checks for all the values and determines whether the output string matches with the given string.

Test: Regular Expression - Question 2

### RE can be used only for values of type string and number.

Detailed Solution for Test: Regular Expression - Question 2

No not for all values the string and numbers can we use the RE.

Test: Regular Expression - Question 3

### You can use RE, if you expect the value of a property to change in an unpredictable way each time its run.

Detailed Solution for Test: Regular Expression - Question 3

Explanation: For every cycle the values does not change unpredictably because the type of grammar that it accepts is defined.

Test: Regular Expression - Question 4

All ___________ Are automatically treated as regular expressions.

Detailed Solution for Test: Regular Expression - Question 4

Explanation: The programmatic description is genuinely treated as regular expression.

Test: Regular Expression - Question 5

If a ‘/’ is used before a character that has no special meaning, ‘/’ is ignored.

Detailed Solution for Test: Regular Expression - Question 5

Explanation: The backslash carries no significance and it is ignored.

Test: Regular Expression - Question 6

The regular expression denote a language comprising all possible strings of even length over the alphabet (0, 1)

Detailed Solution for Test: Regular Expression - Question 6

Explanation: Option A does not consider even length criteria for the question.
Option B it can so happen here that from the former bracket it takes 0 or 1 and takes null from the latter then it forms a string of odd length
Option C it gives either 1 or 0.
Hence Option D is the answer.

Test: Regular Expression - Question 7

The RE gives none or many instances of an x or y is

Detailed Solution for Test: Regular Expression - Question 7

Explanation: Whether x or y is denoted by x+y and for zero or more instances it is denoted but (x+y)*.

Test: Regular Expression - Question 8

The RE in which any number of 0′s is followed by any number of 1′s followed by any number of 2′s is

Detailed Solution for Test: Regular Expression - Question 8

Explanation: The order for the desired string is 012 and foe any number of 0s we write 0* for any number of 1s we denote it by 1* and similarly for 2*.Thus 0*1*2*.

Test: Regular Expression - Question 9

The regular expression have all strings of 0′s and 1′s with no two consecutive 0′s is :

Detailed Solution for Test: Regular Expression - Question 9

From the former bracket we choose 0 or epsilon. Then from the latter part 1 or 10 which can be followed by 1 or 10.

Test: Regular Expression - Question 10

The regular expression with all strings of 0′s and 1′s with at least two consecutive 0′s is:

Detailed Solution for Test: Regular Expression - Question 10

Explanation: The expression (0+1)*00(0+1)* is where either it initially takes 0 or 1 or 00 followed by string of combination of 0 and 1.

Test: Regular Expression - Question 11

Which of the following is NOT the set of regular expression R = (ab + abb)* bbab

Test: Regular Expression - Question 12

String generated byS->aS/bA,A->d/ccA

Detailed Solution for Test: Regular Expression - Question 12

Explanation: S->aS (substitute S->aS)
S->aaS (substitute S->bA)
S->aabA (substitute A->ccA)
S->aabccA (substitute A->d)
S->aabccd.

Test: Regular Expression - Question 13

Consider the production of the grammar S->AA A->aa A->bb Describe the language specified by the production grammar.

Detailed Solution for Test: Regular Expression - Question 13

Explanation: S->AA (substitute A->aa)
S->aaaa
S->AA (substitute A->aa )
S->aaA (substitute A->bb)
S->aabb
S->AA (substitute A->bb the A->aa)
S->bbaa
S->AA (substitute A->bb)
S->bbbb.

Test: Regular Expression - Question 14

If R is regular language and Q is any language (regular/ non regular), then Pref (Q in R) is _____________

Detailed Solution for Test: Regular Expression - Question 14

Explanation: So says the definition of Regular Grammar.

Test: Regular Expression - Question 15

The production of the form non terminal → Λ is said to be null production.

Detailed Solution for Test: Regular Expression - Question 15

The productions of type ‘A -> λ’ are called λ productions ( also called lambda productions and null productions) . These productions can only be removed from those grammars that do not generate λ (an empty string). It is possible for a grammar to contain null productions and yet not produce an empty string.

## Compiler Design

26 videos|55 docs|30 tests
Information about Test: Regular Expression Page
In this test you can find the Exam questions for Test: Regular Expression solved & explained in the simplest way possible. Besides giving Questions and answers for Test: Regular Expression, EduRev gives you an ample number of Online tests for practice

### Up next

 Doc | 3 pages
 Doc | 10 pages
 Doc | 3 pages
 Doc | 1 pages
 Doc | 2 pages

## Compiler Design

26 videos|55 docs|30 tests

### Up next

 Doc | 3 pages
 Doc | 10 pages
 Doc | 3 pages
 Doc | 1 pages
 Doc | 2 pages