0% found this document useful (0 votes)
60 views2 pages

IT5502 Compiler Engineering Ass I

This document contains an assessment test for the Compiler Engineering course taken during the third year, fifth semester of a Bachelor of Technology program in Information Technology. The test contains two parts: Part A contains 5 multiple choice questions worth 2 marks each, testing concepts like lexical analysis, regular expressions, and context-free grammars. Part B contains 2 longer answer questions worth 15 and 5 marks respectively, requiring students to construct automata like NFAs and DFAs from regular expressions, as well as define regular expressions for password requirements.

Uploaded by

Adnan Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views2 pages

IT5502 Compiler Engineering Ass I

This document contains an assessment test for the Compiler Engineering course taken during the third year, fifth semester of a Bachelor of Technology program in Information Technology. The test contains two parts: Part A contains 5 multiple choice questions worth 2 marks each, testing concepts like lexical analysis, regular expressions, and context-free grammars. Part B contains 2 longer answer questions worth 15 and 5 marks respectively, requiring students to construct automata like NFAs and DFAs from regular expressions, as well as define regular expressions for password requirements.

Uploaded by

Adnan Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Register

no:

FACULTY OF INFORMATION & COMMUNICATION ENGINEERING, ANNA UNIVERSITY CEG CAMPUS


DEPARTMENT OF INFORMATION SCIENCE AND TECHNOLOGY
Assessment Test – I
Academic year: 2021 (Odd Semester)
Regulation: 2019
Program: B.Tech (Information Technology) Year / SEM: III year / V sem
Max. Marks: 30 Duration: 1 hr
Date of Exam: 22/10/2021 Staff Name: Dr. M.Vijayalakshmi
& Dr.Abirami Murugappan

Course Code and Title: IT5502 Compiler Engineering

Part A (10 Marks)

Q. Question Course Blooms Marks


No outcome Taxonomy
1. For the block structured code given below, indicate the values assigned CO1 L(1,2) 2
to w, x, y and z
int w, x, y, z;
int i = 4; int j = 5;
{
Int j = 7;
i = 6; w = I +j;
}
x = i + j;
{
int i = 8;
y = i + j;
}
z = i + j;
2. a) Find the Regular Expression corresponding to given statement, CO1 L(3,3) 2
subset of {a, b}*. The Language of all strings containing at least one ‘a’
and at most two ‘b’.
b) Describe the language denoted by the following regular
expression:
(0|1)* (0|1)* 1 (0|1)(0|1)(0|1)

3. What are Buffer pairs and what is the use of Sentinels in it? CO1 L(2,1) 2
4. Identify the lexemes that make up the tokens in the following program CO1 L(4,2) 2
segment. Indicate the corresponding token and pattern.

int num = 56;


if(num % 2 == 0)
printf("%d is even.", num);
else
printf("%d is odd.", num);

5. If L₁ = { a, ba, aa, ab } and L₂ = { a, bb }, What is 2

1) L₁L₂

2) L₁|L₂
3) L22

4) L2*

Part B (40 Marks)


Q. Question Course Blooms Marks
No outcome Taxonomy
6. Consider the following regular expression CO1, CO6 L(4,3) 15
(a|b)*ab(a|b)
1) Construct NFA
2) Apply subset construction method to convert into DFA
3) Minimize the DFA.

7. A strong password is a string that contains CO1, CO6 L(3,2) 5


At least 8 characters (and up to 20 characters)
At least 3 of the following: uppercase, lowercase, numeric, or
special characters.
The allowed special characters are ~ ! @ # $ %  [no spaces
allowed!]

a) Give the regular definitions for the above mentioned strings.


b) Draw the state transition diagram

All the Best!!!!

You might also like