Compiler Design
CSE · Quiz · Spring 26
Paper 1 of 2Section 66_KSwitch
Section 66_K
Paper 1 of 2
Read the questions as text
Read off the PDF by AI, so it may have mistakes. The PDF is the original.
Daffodil International University
CSE313-Compiler design
Spring-2026
Quiz1
Time: 45 minutes
Section: 66_K
Marks: 15
Q1.
Draw a transition state diagram that accepts those strings in the language,
L = {+12, +25, -12.34, +0.45, -0.45, -2.45E12, +2.45E12, -66.78E-21, -66.78e+21,
-0.45E+10, +0.45E+10, -34E5, +45E-10}.
Q2.
Identify the errors in the code and classify them
#include <stdio.h>
int main() {
int 2value = 10;
printf("Hello World!");
int a = 5;
float b = "3.14";
int sum = 0;
for (int i = 1; i <= 5; i++); {
sum = sum + i;
}
printf("Sum = %d\n", sum);
return 0;
}
Q3.
Describe the working mechanism of six phases of the compiler for the
statement: a=b+c*d/5;