How To Exam?

a knowledge trading engine...


M.Sc-M.Sc Computer Science 1st Sem CS - 101 : Principles of Programming Languages(University of Pune, Pune-2013)

Friday, 28 November 2014 12:38Nitha

                                  M.Sc. (Semester - I)

                                            COMPUTER SCIENCE


SEAT No. :

[Total No. of Pages : 3


CS - 101 : Principles of Programming Languages

(2011 Pattern)


Time : 3 Hours]

Instructions to the candidates:

1) Neat diagrams must be drawn wherever necessary. 2) Figures to the right indicate full marks. 3) All questions carry equal marks.

4) Assume suitable data, if necessary. 5) All questions are compulsory.

Q1) Attempt any eight.


[Max. Marks : 80

[8 × 2 = 16]


a) What distinguishes declarative languages from imperative languages.

b) Find o/p of

i) (first (rest (first ‘((a b) (c d))))). ii) (list ‘ (a b c) ‘ ( )).

c) What are bound and free variables in prolog.

d) What is elaboration and referencing environment?

e) What is 1 - value and r - value?

f) “C language does not support array operations” Justify whether true or

false.

g) Define -

i) Static link.

ii) Dynamic link.

h) What is generic subroutine? Name one language which support it.

i) What is task? What is purpose of a task ready queue?

j) Define -

i) Physical concurrency. ii) Logical concurrency.

Q2) Attempt any four.                                                                                   [4 × 4 = 16]

a) Explain how IDE differs from a collection of command - line tools. b) What is an object closure? Explain with suitable example in C++.

c) Explain the difference between applicative and normal order evaluation

of an expression. Under what circumstances is each desirable?

d) Explain the reference counters approach to garbage collection. What

problems are faced with this approach?

P.T.O.


e) Give the implementation for the following shared multiple inheritance.

A

B                    C

D

Q3) Attempt any four.                                                                                   [4 × 4 = 16]

a) Write a pseudo code to illustrate the use of semaphores to provide both

competition and cooperation synchronization for a concurrently accessed shared buffer.

b) Explain why ordering within an expression is important.

c) Explain different approaches to dangling reference problem.

d) What is coroutine? What is quasi - concurrency?

e) What is abstraction? What are the benefits of abstraction provided by

modules and module types.

Q4) Attempt any four.                                                                                   [4 × 4 = 16]

a) Write a code in C/C ++ to demonstrate creation of lost heap - dynamic

variables.

b) What is difference between enumeration - controlled loop and logically

controlled loops?

Consider a midtest loop given below that looks for blank lines in its

input.

for (; ;)

{

line = read _ line ( );

if (all _ blanks (line)) break;

consume _ line (line);

}

show how you might accomplish the same task using post - test loop.

c) Explain following parameter passing modes with proper pseudocode

for each one.

i) Pass by result.

ii) Pass by value result.

d) Explain how cooperation synchronization is accomplished in Java. e) Explain the layout of the run - time stack.

[4339]-101                                                           2


Q5) Attempt any four.                                                                                   [4 × 4 = 16]

a) Write a prolog program to find factorial of a given number.

b) Define a lisp function pal to check whether a given list is palindrome or not. c) Write a lisp function for finding intersection of 2 lists. d) Consider the employee database.

Works _ in (employee _ name, department)

earns (employee _ name, salary)

Write a prolog program to list

i)        All employees not working in sales department.

ii)       List employees earning salary more than 10,000. (Use cut and fail)

e) “All cats like to eat all types of fish. All calico are cats. All tuna are fish.

Charlie is tuna. Herby is tuna puss is calico”. Write a prolog program to answer the question, “what does puss like to eat? Show how it will be answered by your program.

tttt


( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER M.Sc-M.Sc Computer Science 1st Sem CS - 101 : Principles of Programming Languages(University of Pune, Pune-2013)