Documente Academic
Documente Profesional
Documente Cultură
1
III B.Tech I Semester Supplimentary Examinations, May/Jun 2009
PRINCIPLES OF PROGRAMMING LANGAUGES
(Computer Science & Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆
⋆⋆⋆⋆⋆
1 of 1
Code No: 35029 Set No. 2
III B.Tech I Semester Supplimentary Examinations, May/Jun 2009
PRINCIPLES OF PROGRAMMING LANGAUGES
(Computer Science & Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆
1. (a) What are the factors that influence programming language design?
(b) Explain in detail various phases in the process of compilation. [8+8]
2. (a) Prove that the following program is correct provide validations.
{n > 0}
count=n;
sum=0;
while count <> 0 do
sum=sum+count;
count=count-1;
end
{sum = 1 + 2............n}
(b) Write CFG for the language consisting of strings that have n copies of the
letter a followed by the same number of copies of the letter b, where n >0.
Draw the parse trees for the sentences aabb and aaaabbbb, as derived from
the grammar. [8+8]
3. (a) What are the problems associated with using classes in Java for implementing
enumeration types?
(b) What must be the descriptors for static character strings, limited dynamic
strings, and dynamic length strings?
(c) Define strong typing. Discuss how type checking is enforced in Fortran 95,
Ada, C, C++, and Java. What do you mean by coercion, how does it effect
strongly typed languages? [ 4+4+8]
4. (a) What are the advantages and disadvantages of allowing mixed-mode arith-
metic expressions?
(b) Assume the following rules of associativity and precedence for expressions:
1 of 2
Code No: 35029 Set No. 2
Show the order of evaluation of the following expressions:
i. a+b*c+d
ii. a*b-1+c
iii. a*(b-1)/c mod d
iv. (a-b)/c & (d*e/a-3)
(c) Explain in detail multiple selection constructs. [4+4+8]
5. (a) Discuss about actual parameters, positional parameters and keyword parame-
ters.
(b) Explain the general subprogram characteristics. [9+7]
⋆⋆⋆⋆⋆
2 of 2
Code No: 35029 Set No. 3
III B.Tech I Semester Supplimentary Examinations, May/Jun 2009
PRINCIPLES OF PROGRAMMING LANGAUGES
(Computer Science & Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆
⋆⋆⋆⋆⋆
1 of 1
Code No: 35029 Set No. 4
III B.Tech I Semester Supplimentary Examinations, May/Jun 2009
PRINCIPLES OF PROGRAMMING LANGAUGES
(Computer Science & Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆
1. (a) Give an example of two language design criteria that are in direct conflict with
each other.
(b) How is a language implementation system interfaced to the processor?
(c) Is goto a good programming language construct. How does it affect readabil-
ity? [4+6+6]
2. What are different methods for semantic description? Explain with examples. [16]
⋆⋆⋆⋆⋆
1 of 1