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
- Explain the
various characteristics of programming language.
- What is binding
and Binding Time? Also, explain the four classes of binding times.
- Discuss the
various design issues of programming languages.
- Explain briefly
in detail the different types of translators.
- What do you mean
by a software simulated computer? Explain.
- Draw layers of
virtual computers for a web application.
UNIT-2
Attempt any two of the following:
10*2=20
- 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. - Explain
subprogram definitions and subprogram activations? Explain the
implementation of subprogram definition and activation.
- 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
- 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.
- 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.
- 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
- Explain data
flow language and object oriented language? Also, write down the various
comparisons in C and FORTRAN programming languages.
- 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 - 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
- Explain the
concepts of encapsulation, abstraction and information hiding with
examples.
- Explain local
data and local refencing environment of a subprogram with an example.
Also, discuss the concept of retention and deletion in it.
- Discuss the
properties of elementary data types and objects. Also, discuss scalar and
composite elementary data types.
.............................................
No comments:
Post a Comment