Trending ▼   ResFinder  

Pune University - Sem - I : Principles of Programming Languages, April 2010

4 pages, 29 questions, 1 questions with responses, 1 total responses,    0    0
pune_sci
  
+Fave Message
 Home > pune_sci >

Instantly get Model Answers to questions on this ResPaper. Try now!
NEW ResPaper Exclusive!

Formatting page ...

Total No. of Questions :5] P1057 [Total No. of Pages : 4 [3733]-101 M.Sc. COMPUTER SCIENCE CS - 11 - 101 : Principles of Programming Languages ( New & Old Course) (Sem. - I) Time :3 Hours] [Max. Marks : 80 Instructions to the candidates: 1) All questions are compulsory. 2) Neat diagrams must be drawn wherever necessary. 3) Figures to the right indicate full marks. 4) Assume suitable data, if necessary. 5) All questions carry equal marks. Q1) Attempt All : [ 8 2 = 16] a) Give one example and one usage of dataflow languages. b) Write two advantages of multiway assignment. Which language supports this concept? c) Write two disadvantages of Locks & keys machanism. d) What is the difference between formal and actual parameters? e) Justify : True/False : Private members of base class are inherited by derived class. f) What is the difference between concurrent program and parallel program? g) Why variables need not be declared in a prolog program before their use? h) What do you mean by atom in LISP? Give two examples. Q2) Attempt any FOUR : [ 4 4 = 16] a) What determines whether an object is allocated statically, on the stack, or in the heap? b) Differentiate between boolean condition evaluation techniques in C and Pascal. c) Why might a compiler reorder the fields of a record? What problems might this cause? P.T.O. d) Consider the following pseudocode : x : integer y : integer Procedure one ( P : procedure ) x : integer x : = y ; y : = 2 ; P ( ) ; Procedure two x : = x + y Procedure three Write - integer (x) begin /* main */ x : = 0 ; y : = 1 ; one (two) ; three ( ) ; end. What does this program print if the language uses dynamic scoping with deep binding and dynamic scoping with shallow binding? Explain the results. e) Consider the following Pseudocode : Procedure P ( A, B : real ) x : real Procedure Q ( B, C : real ) y : real . . . procedure R ( A, C : real ) z : real . . . (*) Assuming static scope, what is the referencing environment at the location marked by ( * ) ? [3733]-101 2 Q3) Attempt any FOUR : [ 4 4 = 16] a) List the objects and information commonly found in a stack frame. b) What is a dope vector? What purpose does it serve? c) Why tail recursion optimization is significant? Apply the same on the following function by removing the recursive call and replacing it with a loop to compute the same result. Int log2 (int m, int n) { if ( n < 2 ) return m ; else return log2 ( n | 2 , m + 1 ) ; } d) Consider the following diagram depicting subroutine nesting levels with the calling sequence as A, C, D, B, C, D. A B C D Draw the static and dynamic links. Suppose subroutine D now accesses a variable declared in A. How many static links have to be traversed to access this variable? e) What do you mean by Jensen s device? Explain the parameter passing technique used by Jensen s device. Q4) Attempt any FOUR : [ 4 4 = 16] a) Explain shared multiple inheritance with the help of a suitable diagram. b) How does C + + compiler tell which constructor to use for a given object? c) Explain the coherence problem in the context of multiprocessor caches. [3733]-101 3 d) Describe the following terms : i) ii) e) Reentrant procedure. Atomic operation. What makes a programming language successful? Q5) Attempt any FOUR : [ 4 4 = 16] a) Explain any four built - in I | O predicates in prolog. b) Write a prolog program to illustrate the use of red cut. c) Define a recursive function in LISP to return last element of the list. d) Define a recursive function in LISP to append two lists taken as argument. e) Consider the following sentences : All cats like to eat all types of fish. All calico are cats. All tuna are fish. Charlie is tuna. Herb 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. #### [3733]-101 4

Formatting page ...

Top Contributors
to this ResPaper
(answers/comments)


vetagawas

(1)

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

Additional Info : M.Sc. COMPUTER SCIENCE, CS - 11 - 101 : Principles of Programming Languages ( New & Old Course) (Semister - I), Pune University
Tags : msc computer science pune university, msc computer science pune exam papers, Principles of Programming Languages, pune university exam papers, university of pune question papers, pune university science, pune university courses, bsc pune university, msc pune university, pune university solved question papers, pune university model question paper, pune university paper pattern, pune university syllabus, old question papers pune university  

© 2010 - 2025 ResPaper. Terms of ServiceContact Us Advertise with us

 

pune_sci chat