Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
381 views

07a40501 Principles of Programming Languages

The document contains four sets of questions for an exam on Principles of Programming Languages. The questions cover a range of topics including: - Readability and writability of code and performance of compilers vs interpreters. - Semantic models like axiomatic and denotational semantics. - Parameter passing techniques, pointer safety, and type compatibility. - Control structures, boolean and relational expressions, and short-circuit evaluation. - Exception handling in languages like C++, Ada, Java and Prolog. - Features of functional languages like Lisp, ML and Haskell.

Uploaded by

Aadarsh Singh
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
381 views

07a40501 Principles of Programming Languages

The document contains four sets of questions for an exam on Principles of Programming Languages. The questions cover a range of topics including: - Readability and writability of code and performance of compilers vs interpreters. - Semantic models like axiomatic and denotational semantics. - Parameter passing techniques, pointer safety, and type compatibility. - Control structures, boolean and relational expressions, and short-circuit evaluation. - Exception handling in languages like C++, Ada, Java and Prolog. - Features of functional languages like Lisp, ML and Haskell.

Uploaded by

Aadarsh Singh
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 5

R07

Code.No: 44021

SET-1

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD II B.TECH II SEM SUPPLEMENTARY EXAMINATIONS FEBRUARY - 2010 PRINCIPLES OF PROGRAMMING LANGUAGES (COMPUTER SCIENCE AND ENGINEERING) Time: 3hours Max.Marks:80 Answer any FIVE questions All questions carry equal marks --1.a) Why is Readability important to Writability? b) Which produces faster program execution, a compiler or pure interpreter? 2. Define Axiomatic semantics. Explain it in context with Assignment statement, Sequence statements and Selection statements. [16] 3.a) Compare the tombstones and locks & keys methods of avoiding dangling pointers, from the point of view of safety & implementation cost. b) Define name type compatibility and structure type compatibility. What are the relative merits of these two? [8+8] 4.a) Explain in detail Relational expressions, Boolean expressions and Short circuit Evaluation. b) What are guarded commands? Explain. [8+8] 5.a) Explain Type checking techniques in parameter passing. b) Write about Co routines. [8+8] 6.a) Explain parameterized Abstract Data Types. b) Explain how message passing is implemented in Ada. [8+8] [8+8] [8+8]

7.a) Explain basic concepts and design issues of Exception handling. b) Discuss how Exception handlers are helpful in C++ Exception handling. 8.a) Explain the main features of Imperative Languages. b) Write a LISP function Fib(n) that computes n Fibonacci number. ********

[8+8]

th

R07
Code.No: 44021

SET-2

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD II B.TECH II SEM SUPPLEMENTARY EXAMINATIONS FEBRUARY - 2010 PRINCIPLES OF PROGRAMMING LANGUAGES (COMPUTER SCIENCE AND ENGINEERING) Time: 3hours Max.Marks:80 Answer any FIVE questions All questions carry equal marks --1.a) What are the factors influencing Readability of a Language? Explain. b) Briefly discuss a few of the areas of computer applications and their associated Languages. [8+8] 2. Define Attribute grammars. Give an Attribute grammar for simple assignment statements. How is the order of evaluation of attributes determined for the trees of your Attribute grammar? [16] 3.a) Explain in detail various design issues of Character string types. b) Explain pointers in C & C++. [8+8] 4.a) Write about Type conversions. b) Explain in detail counter controlled loops. [8+8]

5.a) Explain how Multidimensional arrays are passed as parameters. b) Define Shallow and Deep binding for referencing environment of subprograms that have been passed as parameters. [8+8] 6.a) What is a friend function? What are the advantages of it? b) Discuss about Binary Semaphores. [8+8] 7.a) Briefly explain Exception handling in Java with example. b) What are the applications of Logic Programming? [8+8] 8.a) Write a detail note on functions in ML. b) Give comparison of Functional and Imperative Languages. ******** [8+8]

R07
Code.No: 44021

SET-3

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD II B.TECH II SEM SUPPLEMENTARY EXAMINATIONS FEBRUARY - 2010 PRINCIPLES OF PROGRAMMING LANGUAGES (COMPUTER SCIENCE AND ENGINEERING) Time: 3hours Max.Marks:80 Answer any FIVE questions All questions carry equal marks --1.a) How can knowledge of programming language characteristics benefit the whole computing community? b) Explain the different aspects of the cost of a programming language. [8+8] 2.a) Describe the basic concepts of Denotational semantics. b) How do you express the associativity of operators in grammar? Explain with an example. [8+8] 3.a) Define Lifetime, Scope, Static Scope & Dynamic Scope. What are the general problems with Static Scoping? b) Discuss on implementation of pointer & reference types. [8+8] 4.a) Explain in detail Selection statements and its categories. b) What is short circuit evaluation? What are its advantages? [8+8]

5. What are the different models of parameter passing methods? How are they implemented? Give example for each. [16] 6.a) What are the language design requirements for a language that supports Abstract data types? b) Write about Semaphores, Monitors & Message passing. [8+8] 7.a) Explain Exception handling in Ada. b) Explain how backtracking works in Prolog. 8.a) Explain about LISP Interpreter. b) Explain some of the important functions of LISP. ******** [8+8] [8+8]

R07
Code.No: 44021

SET-4

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD II B.TECH II SEM SUPPLEMENTARY EXAMINATIONS FEBRUARY - 2010 PRINCIPLES OF PROGRAMMING LANGUAGES (COMPUTER SCIENCE AND ENGINEERING) Time: 3hours Max.Marks:80 Answer any FIVE questions All questions carry equal marks --1.a) What does it mean for a program to be reliable? Explain. b) Explain how the Von Neumann architecture affected the design of programming language. [8+8] 2.a) What is Ambiguity? How can it be removed, show with an example. b) Explain with an example how the weakest precondition for a logical pretest loop is derived. [8+8] 3.a) Define static, stack dynamic, explicit heap dynamic & implicit heap dynamic variables. What are the advantages & disadvantages of these? [8+8] 4. Explain Iterative statements and its categories. [16] [8+8]

5.a) Discuss on Generic Subprograms in Ada and C++. b) In what ways Coroutines different from conventional Subprograms.

6.a) Briefly explain the sub-program level concurrency. b) Define Monitor. Explain how cooperation synchronization and competition synchronization are implemented using monitors. [8+8] 7.a) Explain Exception handling in Ada b) Discuss about basic elements of Prolog. Give examples. 8.a) What are the applications of Functional Languages? b) Explain how Haskell differs from ML. [8+8] ******** [8+8]

You might also like