Friday, 26 April 2013

PRINCIPLE OF PROGRAMMING LANGUAGES

PRINCIPLE OF PROGRAMMING LANGUAGE
SEM-V, 2012-13
B.TECH
UTTARAKHAND TECHNICAL UNIVERSITY
(UTU)



Time : 3 Hours
Total Marks : 100
UNIT-1
Attempt any four of the following:
5*4=20
  1. Explain the various characteristics of programming language.
  2. What is binding and Binding Time? Also, explain the four classes of binding times.
  3. Discuss the various design issues of programming languages.
  4. Explain briefly in detail the different types of translators.
  5. What do you mean by a software simulated computer? Explain.
  6. Draw layers of virtual computers for a web application.
UNIT-2
Attempt any two of the following:
 10*2=20
  1. For an elementary data type in a language with which you are familiar, do the following
    (i)Explain the difference among the type, variables of that type, and constants of that type.
    (ii)Show a situation during execution where a data object of that type exist that is neither a variable nor a constant.
  2. Explain subprogram definitions and subprogram activations? Explain the implementation of subprogram definition and activation.
  3. Explain implicit and explicit sequence control. Explain sequence control of basic statements, compound statement and conditional statements with examples.
UNIT-3
Attempt any two of the following:
10*2=20

  1. Explain why it is impossible in a language with only parameters transmitted by value or name, such as ALGOL, to write a subprogram Swap of two parameters that simply swaps the values of its two parameters (which must be simple and subscripted variables). For example, Swap called by swap(X,Y) should return with X having the original value of X and Y and Y the original value of X. Assume that Swap works only for arguments of type integer.
  2. What is storage management? Write down the phases of storage management. With an example and diagram, explain the heap based and stack based storage allocation for LISP.
  3. What do you mean by static scope and dynamic scope? Explain the dynamic scope parameter passing mechanism with an example. 

UNIT-4
Attempt any two of the following:
10*2=20

  1. Explain data flow language and object oriented language? Also, write down the various comparisons in C and FORTRAN programming languages.
  2. Find the set of free variables for each of the following lambda expressions:
    (i) λ x . x y λ z . x z
    (ii)(λ x . x y) λ z . w λ w . w z y x
    (iii)x λ z . x λ w . w z y
    (iv)λ x . x y λ x . y x
    (v)(λ x . x ) (λ y . y ) λ x . x(λ y . y) z
  3. Discuss Functional programming. Also, discuss the various types and classes used in functional programming.

UNIT-5
Attempt any two of the following:
10*2=20

  1. Explain the concepts of encapsulation, abstraction and information hiding with examples.
  2. Explain local data and local refencing environment of a subprogram with an example. Also, discuss the concept of retention and deletion in it.
  3. Discuss the properties of elementary data types and objects. Also, discuss scalar and composite elementary data types.
.............................................

No comments: