Anda di halaman 1dari 4

Set No.

Code No:221501 1
II B.Tech., II-Semester Supplementary Examinations, November-2003

PRINCIPLES OF PROGRAMMING LANGUAGES


(Computer Science and Systems Engineering)
Time: 3hours Max.Marks:80
Answer any FIVE questions
All questions carry equal marks
----

1.a) Write the rules for translating BNF into syntax graphs. Give suitable examples.
b) What are the major differences between procedure-oriented and object-oriented
programming.

2.a) What is a variable ? What are its components?


b) Explain how conditional statements are implemented in ALGOL-60, PL/1, and C
languages.

3.a) Distinguish type coercion and type equivalence.


b) What are different structured data types. Give a typical ALGOL 68 record
declaration.

4.a) Distinguish the following parameter passing methods with suitable examples.
(i) Call by value (ii) Call by reference (iii) Call by name
b) Discuss different parameter passing mechanisms in ADA.

5.a) Explain the dynamic scoping in programming languages, with a suitable example.
b) Define a liasing. Explain its merits and demerits.

6.a) Explain briefly how exception handling is carried out in PL/1.


b) What is meant by abstract data type? Give an abstract specification for queue.

7.a) Distinguish between semaphore and monitor.


b) How monitor is implemented in CSP/K.

8. Briefly explain the following:


(a) BNF Notation
(b) Logic programming
(c) Semaphore.

!!!!!
Set No.

Code No:221501 2
II B.Tech., II-Semester Supplementary Examinations, November-2003

PRINCIPLES OF PROGRAMMING LANGUAGES


(Computer Science and Systems Engineering)
Time: 3hours Max.Marks:80
Answer any FIVE questions
All questions carry equal marks
----

1.a) What is meta language. Demonstrate BNF description of the ALGOL-60 ‘for’
statement.
b) Draw the syntax graph for ALGOL-60 ‘for’ statement.

2.a) Distinguish between static and dynamic allocation of memory.


b) Explain different conditional statements in ALGOL-68 and C languages.

3.a) What are the characteristics of enumerated data type. Give an example using Pascal
language.
b) What are the design issues in pointer data types. What are its merits and demerits.

4.a) Define ahasing. What are its merits and demerits?


b) Explain different parameter passing methods permissible in C language.

5.a) Distinguish between parameter passing by name and parameter passing by text.
b) What is scope and extent? Explain the dynamic scoping rule.

6.a) What is coroutine? Which languages support it? Distinguish coroutine and
procedure.
b) Define abstract data type. Give an abstract specification of binary search tree.

7.a) What is semaphore? Explain how a binary semaphore is implemented.


b) Give a solution to producer-consumer problems using monitors.

8. Briefly explain the following :


(a) Monitors
(b) Message passing
(c) Generic functions.

!!!!!
Set No.

Code No:221501 3
II B.Tech., II-Semester Supplementary Examinations, November-2003

PRINCIPLES OF PROGRAMMING LANGUAGES


(Computer Science and Systems Engineering)
Time: 3hours Max.Marks:80
Answer any FIVE questions
All questions carry equal marks
----

1.a) What are the salient features of a programming language?


b) Explain with suitable examples, how different BNF descriptions are converted into
syntax graphs.

2.a) What is the difference between static binding and dynamic binding? Demonstrate
with a suitable example.
b) List and explain different conditional statements in Pascal and ADA.

3.a) Explain the string processing features available in SNOBOL language with suitable
examples.
b) What is dangling pointer ? When does it occur?

4.a) Distinguish between scope and extent ?


b) Explain the following parameter passing methods with suitable examples.
(i) Call by value (ii) Call by reference (iii) Call by value-result.

5.a) Distinguish between subroutine and function.


b) What is generic function. Give a suitable example.

6.a) What are various design issues of exception handling?


b) Explain how the exception handling is implemented in PL/1.

7.a) What is the objective of monitor? Explain how the monitor is implemented in
SIMULA.
b) What is concurrency ? Briefly explain the concurrency features in ADA.

8. Briefly explain the following :


(a) Basics of LISP
(b) Type equivalence
(c) Coroutine.

!!!!!
Set No.

Code No:221501 4
II B.Tech., II-Semester Supplementary Examinations, November-2003

PRINCIPLES OF PROGRAMMING LANGUAGES


(Computer Science and Systems Engineering)
Time: 3hours Max.Marks:80
Answer any FIVE questions
All questions carry equal marks
----

1.a) Write the BNF description of ‘for’ statement in ALGOL-68 language.


b) Define syntax, semantics and pragmatics of a language.

2.a) Distinguish the following :


(i) Compile time (ii) Link time (iii) Load time (iv) Run time.
b) Explain how ‘for’ statement is implemented in ADA, Pascal and C languages.

3.a) What is type coercion. How the issue of coercion handled in Pascal, ALGOL-68 and
ADA.
b) Distinguish array and record? Give an example of C record (structure) declaration.

4.a) Distinguish between static scope and dynamic scope.


b) What is activation record. Briefly explain its role while program execution.

5. What are different parameter passing mechanisms? Demonstrate with suitable


examples.

6.a) List and briefly explain different exception handlers available in ADA.
b) How is raising an exception different from procedure invocation.

7.a) Explain how message passing is achieved in ADA, between two tasks.
b) Give a solution to producer-consumer problem using monitors.

8. Write short notes on :


(a) Functional programming
(b) Function overloading
(c) Semaphore.

!!!!!

Anda mungkin juga menyukai