CS606 Finalterm Current Paper 2013 File 3 Shared by syeda Areeba

No Comments

Mcqs kuch past paper main se thy and mostly new book main se thy
Total question 52 thy 40 mcqs and 12 subjective questions thy
1.How Lex different from Flex? (2marks)
2.What are two properties to reducible flw graph? (2 marks)
3.What type of information stored in Lex/Flex input file? (2 marks)
4. Which information we get from the third YACC file? (3 marks)
5. write regular expression for the language of all words that starts and ends with different letters? (3marks)
6. when we use garbage collection with respect to memory management? (3marks)
7. consider the following grammar which generates expression by applying ‘’+’’ to integer and floating points constants. When two integers are added, the result integer otherwise it is a float (5 marks)
E(arrow)E +EIT
T(arrow)num.numInum. 
8. Add semantic rules to the following grammar to complete the attributes ‘’rm’’ whose values is the right most terminal in the string we parsed (5marks)
S(arrow)A
{Srm=
A(arrow)A1xy
IBA1y
B(arrow)B1z
Ix
9. For each instruction, show which variable are live variable are live imidiately after instruction execution (5marks)
1. A=7
2. B=A+2
3. C=A+B
4.D=C+B
5.B=C+B
10. How many place holder positions we can use if production has ‘’K’’ symbol at right hand side at the shift reduce parsing?

Next PostNewer Post Previous PostOlder Post Home

0 comments

Post a Comment