PRINCIPLES OF PROGRAMMING LANGUAGES-MCA 1.2.3



MCA 1.2.3 PRINCIPLES OF PROGRAMMING LANGUAGES. (Model Paper)



First Question is Compulsory

Answer any four from the remaining

Answer all parts of any Question at one place.

Time: 3 Hrs. Max. Marks: 70



1. Explain the following terms.

a. Dangling – Else ambiguity.

b. Coercion.

c. Activation record.

d. Dangling pointers.

e. Constructors.

f. In-Line functions.

g. Recursive functions.

h. Quoting in Lisp.

i. Cut predicate in PROLOG.

j. Rendezvous in Ada.



2. a. Discuss the evolution of programming languages.

b. The following is a set of BNF rules for real numbers where R stands for Real

number, I stands for Integer, F for fraction, D for digit

<R> ::= <I>.<F>

<I> ::= <D>|<I><D>

<F> ::= <D>|<D><F>

<D> ::= 0|1|2|3|4|5|6|7|8|9

Using the above grammar give a left most derivation of the string 2.89 and draw tree

snapshots corresponding to the above derivation.



3. a. Discuss syntax directed control flow.

b. Dew flow diagram for the following program fragment.

loop

S1;

If E then exit end;

S2

End



4. a. With suitable examples explain type equivalence

b Explain Static and dynamic scope roles.



5. a. With a suitable example explain the concept of inheritance in Object Oriented

programming.

b. Explain Virtual functions in C++.



6. a. Explain the rules for expression evaluation in functional programming.

b. Explain control mechanism in PROLOG.



7. a. Discuss concurrent tasks in Ada.

b. Explain how semaphores can be used to achieve mutual exclusion.



8. Explain the following

a. Early and late binding.

b. Information hiding.

0 comments:

Post a Comment

 
Etutos © 2010-2011