0% found this document useful (0 votes)
278 views

r05310505 Principles of Programming Langauges

The document contains 4 sets of questions for a Principles of Programming Languages exam. It includes questions about topics like von Neumann architecture, language evaluation criteria, grammars, data types, control structures, parameter passing, concurrency, and features of languages like C, C++, Prolog, Lisp, ML. Students must answer 5 out of the 8 questions in each set, which vary in number of sub-questions and point value. The exam covers a wide range of foundational programming language concepts.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
278 views

r05310505 Principles of Programming Langauges

The document contains 4 sets of questions for a Principles of Programming Languages exam. It includes questions about topics like von Neumann architecture, language evaluation criteria, grammars, data types, control structures, parameter passing, concurrency, and features of languages like C, C++, Prolog, Lisp, ML. Students must answer 5 out of the 8 questions in each set, which vary in number of sub-questions and point value. The exam covers a wide range of foundational programming language concepts.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Code No: R05310505 Set No.

1
III B.Tech I Semester Supplimentary Examinations, February 2008
PRINCIPLES OF PROGRAMMING LANGAUGES
(Computer Science & Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆

1. (a) Explain about von Neumann computer architecture and the programming
language paradigm dictated by the architecture.
(b) Briefly discuss the list of criteria for language evaluation. [8+8]

2. (a) Distinguish between language recognizers and language generators.


(b) Give BNF and EBNF versions of grammar for expressions in ‘C’ language
[6+10]

3. (a) How can enumeration types be implemented in languages that do not have
enumeration types and what are the problems associated with such imple-
mentations?
(b) What are the advantages and disadvantages of static variables?
(c) Explain pointers in C and C++ . [4+6+6]

4. (a) Explain two-way selectors and their design issues.


(b) Explain in detail relational expressions, Boolean expressions and short-circuit
evaluations. [8+8]

5. (a) What are advantages and disadvantages of dynamic local variables?


(b) In what ways coroutines different from conventional subprograms?
(c) What is parametric polymorphism? [5+6+5]

6. (a) Briefly explain about naming encapsulation.


(b) Describe the two problems that appear in the construction of large programs
that led to the development of encapsulation constructs. [8+8]

7. (a) Discuss about basic elements of prolog. Give examples.


(b) Write a prolog description of your family tree (based only on facts),going back
to your grand parents and including all descendants. Be sure to include all
relationships. [8+8]

8. (a) Explain main features of imperative languages.


(b) Write a LISP function fib(n) that computes nth Fibonacci number. [8+8]

⋆⋆⋆⋆⋆

1 of 1
Code No: R05310505 Set No. 2
III B.Tech I Semester Supplimentary Examinations, February 2008
PRINCIPLES OF PROGRAMMING LANGAUGES
(Computer Science & Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆

1. Explain language evaluation criteria and the characteristics that affect them. [16]

2. (a) In what fundamental way do operational semantics and denotational semantics


differ?
(b) What are the difficulties in using an attribute grammar to describe all of the
syntax and static semantics of a contemporary programming language?
(c) Explain with an example how operator associativity can be incorporated in
grammars. [5+5+6]

3. (a) What are the advantages and disadvantages of implicit declaration?


(b) Evaluate the two approaches for supporting dynamic allocation and dealloca-
tion for dynamic length strings.
(c) Explain in detail arrays, indices, subscript bindings, and array categories.
[4+4+8]

4. Discuss in detail selection statements and their design issues. [16]

5. (a) What are advantages and disadvantages of dynamic local variables?


(b) In what ways coroutines different from conventional subprograms?
(c) What is parametric polymorphism? [5+6+5]

6. Explain the following terms :

(a) Message passing


(b) Concurrency in Ada
(c) Monitors [6+5+5]

7. Explain exception handling mechanism in C++. Illustrate with appropriate C++


programs. [16]

8. (a) Explain structures and arrays in ML give examples.


(b) Discuss briefly about expressions in ML. [8+8]

⋆⋆⋆⋆⋆

1 of 1
Code No: R05310505 Set No. 3
III B.Tech I Semester Supplimentary Examinations, February 2008
PRINCIPLES OF PROGRAMMING LANGAUGES
(Computer Science & Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆

1. (a) How readability and writability contradict with each other? Explain with an
example.
(b) Give advantages and disadvantages of pure compilation and pure interpreta-
tion.
(c) What are the factors influencing the writability of a language? [4+6+6]
2. (a) What do you mean by static semantics? Give examples of static semantic
rules that are difficult and impossible to describe with BNF.
(b) A concise and understandable description of a programming language is es-
sential to the language’s success. Comment on this.
(c) Define axiomatic semantics. Comment on its applicability. [5+5+6]
3. (a) Explain in detail dynamic type binding.
(b) Explain in detail various design issues of character string types. [8+8]
4. (a) Explain Dijkstra’s selection construction and loop structure.
(b) Explain with examples user-located loop control mechanisms provided by var-
ious languages. [8+8]
5. (a) Explain with examples pass- by- value and pass- by- reference parameter pass-
ing techniques.
(b) Explain type checking technique in parameter passing. [8+8]
6. Explain the following terms :
(a) Message passing
(b) Concurrency in Ada
(c) Monitors [6+5+5]
7. (a) Write a prolog program that returns last element of a given list.
(b) Explain the closed world assumption used by prolog. Why is this a limitation?
[10+6]
8. (a) Explain the structured data types of LISP.
(b) Write a detail note on functions in ML. [8+8]

⋆⋆⋆⋆⋆

1 of 1
Code No: R05310505 Set No. 4
III B.Tech I Semester Supplimentary Examinations, February 2008
PRINCIPLES OF PROGRAMMING LANGAUGES
(Computer Science & Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆

1. (a) Give an example of two language design criteria that are in direct conflict with
each other.
(b) How is a language implementation system interfaced to the processor?
(c) Is goto a good programming language construct. How does it affect readabil-
ity? [4+6+6]

2. (a) Distinguish between two mathematical models of a language description.


(b) What do you mean by static semantic rules? Give examples of programming
language structures or elements that can be described easily with attribute
grammars than with BNF.
(c) Describe the basic concept of denotational semantics. [5+5+6]

3. (a) What are the advantages and disadvantages of dynamic type binding?
(b) Compare the tomb-stones and locks-and-keys methods of avoiding dangling
pointers, from the points of view of safety and implementation cost.
(c) Define name type compatibility and structure type compatibility. What are
the relative merits of these two? [5+6+6]

4. (a) Explain in detail counter-controlled loops.


(b) Discuss precedence and associativity rules of different programming languages.
[8+8]

5. Explain the following terms:

(a) Generic function


(b) Overloaded operator
(c) Functions
(d) Call-by-text [4+4+4+4]

6. Explain the following terms :

(a) Message passing


(b) Concurrency in Ada
(c) Monitors [6+5+5]

7. (a) “All Prolog statements are constructed from Terms”. Justify your answer.

1 of 2
Code No: R05310505 Set No. 4
(b) Explain Fact and Rule Statements in Prolog with suitable examples. [8+8]

8. (a) Explain about functions in ML.


(b) Discuss about exceptions in ML. [8+8]

⋆⋆⋆⋆⋆

2 of 2

You might also like