Question Paper Details:
University: Rajasthan Technical University
Course: B.Tech Computer science & engineering
Subject: Principle of Programming Languages
Exam Year: June 2010
Year or Semester: Second year/ Fourth Semester
Paper Code: 4E2916
Unit-I
a) Why study the programming languages? Give some effective reasons? [Marks 8]
b) Explain the different language paradigms with suitable examples? [Marks 8]
OR
a) Explain the organization of conventional computer with block diagram? [Marks 8]
b) Explain the stages of translation i.e. in a compiler with following examples?
Real A:=B+C*10; [Marks 8]
Unit-II
a) Describe the example of an operation in a programming languages that: [Marks 8]
i) Is implemented directly in hardware.
ii) Is implemented as a subprogram.
iii) Is implemented as a inline code sequence.
b) Explain implementation of structure data type with following example:
Char array[10]; [Marks 8]
OR
a) What are the different elements of specification of a elementary data types? Give general signature of specification of an operation. [marks 8]
b) What are the arrays & variant records? How they differ from the conventional arrays and records. Explain with suitable example. [Marks 8]
Unit-III
a) If (N>final val) {….}
Return (20*X+M(N)); }
Now explain the components of an activation of the subprogram which are needed at runtime. [Marks 8]
b) Define the structured sequence control statements. Explain the conditional statements and its implementation with suitable example. [Marks 8]
OR
a) Explain the difference between Emlicit and Explicit sequence control. [Marks 4]
b) Differentiate between unification & substitution. [Marks 4]
c) What are the problems are occurs in evolution of tree representation of expression. [Marks 8]
Unit-IV
a) Give a program fragment that produces different result under each of the following parameter passing techniques: [Marks 8]
i) Call by value
ii) Call by reference
iii) Call by name.
b) Explain the block structure with suitable example? [Marks 8]
OR
a) Consider the following subprogram definition in Pascal:
Procedure SUB(X: integer);
Var Y: real;
Z:array [1..3] of real;
Procedure SUB 2;
Begin
…….
End {SUB 2}..;
Befing…….
End {SUB}; [Marks 8]
b) Explain the static and dynamic scope with suitable example? [Marks 8]
Unit-V
a) Explain the heap storage management with
i) Fixed size storage management.
ii) Variable size storage management. [Marks 8]
b) What are the elements requiring in storage explain. [Marks 8]