Cochin University Exam Papers BE CS 4th Semester Principles of Programming Languages April 2010

Cochin University Exam Papers BE CS 4th Semester

Principles Of Programming Languages April 2010


CS 402 Principles Of Programming Languages

(2002 Scheme)


I. Discuss briefly about the various factors that affect the programming language evaluation.


II. (a) What is Backus – Naur Form? With suitable example show how it can be used for describing the syntax of a programming language.

(b) Prove the following program is correct:

{S >1}

while (S’ >l)

{S=S/2 }

{5 = 1}


III. (a) In terms of lifetime of a variable discuss about the various types of variables that can be seen in programming languages.

(b) Differentiate static scoping and dynamic scoping of a variable with examples.


IV. (a) Explain briefly how array elements are represented in memory using row major – order and column maj or order.

(b) What are pointers? What are the various design issues associated with pointers?


V. (a) what do you mean by Data Abstraction? How data abstraction is achieved in C++.

(b) What is Inheritance? Explain how Inheritance is achieved in Java.


VI. Explain briefly the various features of object oriented programming languages with suitable examples.

(a) Briefly explain the characteristics of functional programming languages.

(b) What are lists and atoms in LISP? Write a LISP function to check whether an atom is present in a list.


VII. (a) Write a LISP function to find the factorial of a number.

(b) Briefly explain the following LISP functions :

(i) EVAL                                             (ii) CAR

(iii) COND                                         (iv) QUOTE

(v) CONS.


VIII. (a) Explain the concept of predicate calculus with examples.

(b) Briefly explain the inferencing process in Prolog.


IX. (a) Discuss about the different types of statements in Prolog.

(b) With a suitable example explain the tracing model in Prolog.

Leave a Comment