Manipal University 2007 B.E Computer Science V SEMESTER (CSE) MAKEUP - - Question Paper
V SEMESTER B.E. (CSE)
MAKEUP exam JANUARY - 2007
SUBJECT: PRINCIPLES OF PROGRAMMING LANGUAGES
MANIPAL INSTITUTE OF TECHNOLOGY (Constituent Institute of MAHE- Deemed University)
MANIPAL-576104
g
INSPIRED BY LIFE
V SEMESTER B E. (CSE)
MAKEUP EXAMINATION JANUARY - 2007 SUBJECT: PRINCIPLES OF PROGRAMMING LANGUAGES
MAX.MARKS : 50
TIME : 3 HOUR
Answer any FIVE full questions.
1. (a) Explain the computational paradigms in Programming Languages. 4
1. (b) Briefly explain Regularity and its subdivisions. 3
1. (c) Given the following BNF:
expr (list) | a list list, expr | expr
Write EBNF and syntax diagram for the above. 3
2. (a) Explain the specification, operations and the implementation of Vectors. 5
2. (b) Explain the specification and syntax of character strings and various operations performed on them. 5
3. (a) Explain the alias and dangling reference with example.
4
3. (b) The following program prints two integer values. The first value is typically garbage ( or possible zero ) but the second value might be two. Explain why? #include<stdio.h> void P(void)
{ int y;
printf( %d \n, y );
y = 2; }
main( )
{ p( ) ;
P( );
Return o ; } 2
3. (c) Explain loops and variations on while with examples. 4
4. (a) Explain the case-switch statement by giving an ada example.
2
4. (c) With an example, explain how dynamic binding is implemented in OOL. 3
4. (d) What is the difference between a type and a class? 2
5. (a) Explain with suitable example, how assignment is made in Scheme. 3
5. (b) Write a tail recursive function to reverse the list L. 2
5. (c) Explain with example the selector and constructor functions in Scheme. 3
5. (d) Write the prolog clauses for append and reverse. 2
6. (a) List the problems with logic programming and explain any two of them. 4
6. (b) Distinguish between C++ name spaces and Java packages. 3
6. (c) List the problems with ADT mechanisms and explain any two of them. 3
Attachment: |
Earning: Approval pending. |