How To Exam?

a knowledge trading engine...


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

Friday, 28 November 2014 12:39Nitha

                                  M.Sc. (Semester - I)

                                         COMPUTER SCIENCE


SEAT No. :

[Total No. of Pages : 3


CS - 101 : Principles of Programming Language

(2008 Pattern)

Time : 3 Hours]                                                                                           [Max. Marks : 80

Instructions to the candidates :

1)      All questions are compulsory.

2)      Figures to the right indicates full marks.

3)      All questions carry equal marks.

Q1) Attempt all of the following :                                                             [8 × 2 = 16]

 

State any four datatypes predicates in LISP.

Give the structure of PROLOG program. Define precedence and associativity.

Differentiate type casting and coercion.

What are first and second class subroutines?

What is the use of cactus stack.

Define :


i)        Dynamic binding.

ii) Binding’s Lifetime.

h) State any two real life applications of multithreading.

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

a) What determine whether an object is allocated statically, on the stack or

on the heap.

b) Why there are so many programming languages? Explain.

c) What is a referencing environment? Describe the difference between deep

and shallow binding of referrencing environments.

d) Differentiate between boolean condition evaluation techniques in C and

PASCAL.

e) Discuss the significance of holes in records. Why do they arise? What

problems do they cause.

P.T.O.

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

a) What is a dope vector? What purpose does it serve?

b) What is subroutine calling sequence? What does it do? What is meant

by the subroutine prologue and epilogue.

c) Explain how assignment operations are implemented in imperative

languages.

d) What are dangling references? How are they created? Why are they a

problem? Discuss the advantages of tombstones to solve the problem.

e) Consider the following program segment in C++.

try { - - -

// Protected block of code

} catch (end _ of _ file)

{---}

catch (io _ error e)

{ // handler for io-error other than end-of-file

}       catch (- - -)

{ // handler for any exception not previously named

}

show how this exceptions can be handled using exception handler in C++.

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

a) State six different syntactic constructs commonly used to create new

thread of control in a concurrent program? Explain any one.

b) What do you mean by collateral execution? Illustrate with the help of

suitable example.

c) Explain how shared multiple inheritance is implemented with suitable

diagram.

d) What is critical section? What is semaphore? Why semaphore is used? e) The main program calls P1, P1 calls P2 and P2 calls P3. What is the

stack layout after these calls? Show the stack with subroutine frames and static links.

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

a) Define a LISP function to find the smallest element from the list.

b) Define a LISP function to find a power. Power (m, n) = m raised to the

power of n.

[4339]-11                                                         2


c) Write a PROLOG program to store and retrieve the compound object

part which contains (no, description, unit-price, quantity). The program should output the list of parts.

d) Write a PROLOG program to count the number of words in a given

sentence.

e) Consider the following sentences.

John likes all animals. Cat, bird, dog and snake are animals.

Write a PROLOG program such that goal :

likes (John, Snake)

return false; whereas for other animal it will return ture.

xxxx 


( 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 Language(University of Pune, Pune-2013)