

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Assignment solutions for Compiler Design
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!


a. Computer Languages can be classified in how many types? 5 b. Draw a flowchart to check whether the number is prime or not. 5 c. Explain the character set of C language. 5 Q2. CO a. With the help of an example explain how many types of control statements are supported by C. 5 b. Write an algorithm to print Fibonacci series. 5 c. Explain the categories of operators used in C 5 Q3. CO a. Write a C program to implement the following 8
a. What is the output of the each program.(Justify your answer) 6 main() main() { { int i=0,x=0; int i,x=0; while(i<20) for (i=1;i<10;i=i*2) { { if (i%5==0) x++;} { printf(“%d”,x); x+=i; } } } printf(“%d”,x); } b. Write a function to calculate sum, and product of three numbers using call by value and call by reference 5 c. Write a program to accept any 3 x 3 matrix and print the inverse of that matrix. 4 Q5. CO a. What is the difference between Structures and Unions? Create a structure 5 “Employee” with date members as ‘Employee Name’, ‘Salary’, ‘Department Name’. Input the value of 2 such Employees. b. What do you mean by user defined and inbuilt functions? Give some examples 5 c. Write a program to accept a line of text “Mississippi”. Display the number of occurrences of each character in the line. 5