You are on page 1of 4

Code No: 35014 R05 Set No - 1

III B.Tech I Semester Supplimentary Examinations,Nov/Dec 2009


PRINCIPLES OF PROG. LANGUAGES
Computer Science And Engineering
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
?????

1. (a) Explain how subprogram names are passed as parameters.


(b) Explain how subprogram is overloaded? Give examples. [8+8]

2. Explain in detail the sequence control in ML. [16]

3. What are different methods for semantic description? Explain with examples. [16]

4. (a) What are Boolean types? How they are usually represented on a machine?
(b) Distinguish between explicit variable declaration and implicit variable decla-
ration. What is the danger associated with implicit declaration?
(c) What are the advantages and disadvantages of stack-dynamic variables? [5+5+6]

5. Explain two-way selectors, their design issues, problems with nesting selectors. How
various programming languages resolve the problem? [16]

6. (a) With an example explain how reliability and cost of execution conflict with
each other.
(b) What do you mean by orthogonality? How does it contribute to readability?
(c) Explain briefly various language categories. [4+4+8]

7. (a) What is binary semaphore? What is counting semaphore?


(b) Describe the actions of the three Java Methods that are used to support co-
operation synchronization.
(c) Explain the two Java constructs that can be synchronized. Give the reasons.
(d) Which is more general, concurrency through monitors or concurrency through
message passing. [5+5+3+3]

8. (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]

?????

1
Code No: 35014 R05 Set No - 2
III B.Tech I Semester Supplimentary Examinations,Nov/Dec 2009
PRINCIPLES OF PROG. LANGUAGES
Computer Science And Engineering
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
?????

1. (a) Define semaphores. Explain, how cooperation synchronization and competi-


tion synchronization are implemented using semaphores.
(b) What are the primary problem using semaphores to provide synchronization?
[8+8]
2. (a) What are the advantages and disadvantages of user-defined overloading?
(b) Write notes on operator evaluation order.
(c) Explain in detail relational and Boolean expressions. [4+6+6]
3. (a) Write on decimal data types. What are the advantages and disadvantages of
decimal data type?
(b) What is a variable and what are the attributes of a variable? Elaborate on
address of a variable.
(c) What are the design issues for names? Explain in detail. [5+5+6]
4. (a) Explain how Sub-programs are overloaded.
(b) Discuss about the procedures and functions in Sub-programs. [8+8]
5. What is meant by logic programing? What are the applications of it? Explain logic
programming in PROLOG with examples? [16]
6. (a) Explain the uses of exception handling in programming languages.
(b) Explain the salient features of PROLOG. [8+8]
7. (a) How do datatypes and structures aid readabililty?
(b) What do you mean by virtual computer?
(c) Can a computer be designed and built with a particular high-level language
as its machine language. Describe the characteristics of such a computer.
[4+4+6]
8. (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]

?????

2
Code No: 35014 R05 Set No - 3
III B.Tech I Semester Supplimentary Examinations,Nov/Dec 2009
PRINCIPLES OF PROG. LANGUAGES
Computer Science And Engineering
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
?????

1. (a) Discuss about various programming domains and their associated languages.
(b) Give some reasons why computer scientists and professional software develop-
ers should study general concepts of language design and evaluation. [8+8]
2. (a) Explain two-way selectors and their design issues.
(b) Explain in detail relational expressions, Boolean expressions and short-circuit
evaluations. [8+8]
3. (a) Distinguish between pass-by-value and pass-by reference.
(b) Explain the characteristics of sub program. [8+8]
4. (a) What is the problem with case sensitive names?
(b) Write short notes on floating-point data type. What do you mean by precision
and range? Also give IEEE Floating-Point Standard 754 format for single-and-
double-precision representation.
(c) What is a variable? What are the attributes of a variable? Elaborate on each
of them. [4+6+6]
5. (a) Write about Function composition , construction and apply-to-all, in mathe-
matical functions.
(b) Write about simple functions in mathematical function. [8+8]
6. (a) Briefly discuss about different types of abstract data types.
(b) What are the languages design requirements for a language that supports
abstract data types?
(c) What is an ADA specification package? What is body package? [6+5+5]
7. (a) Write comparisons of Prolog with ML including two similarities and two Dif-
ferences
(b) Write a Prolog program that finds the maximum of list of numbers. [8+8]
8. (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
Code No: 35014 R05 Set No - 4
III B.Tech I Semester Supplimentary Examinations,Nov/Dec 2009
PRINCIPLES OF PROG. LANGUAGES
Computer Science And Engineering
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
?????

1. (a) What are the disadvantages of pure interpreter over compiler?


(b) What do you mean by a linker?
(c) Explain in detail various programming domains [4+4+8]
2. (a) Define exceptions? Explain exception propagation in C++.
(b) Explain the control structure of a PROLOG program. [8+8]
3. (a) Explain with an example the “for” statement of the C-based languages.
(b) Explain with an example multiple selections using “elsif ” in Ada.
(c) Explain Dijkstra’s selection construction with an example. [5+5+6]
4. (a) Compare structure programming and functional programming.
(b) What are the three features of Haskell that makes very different from schema?
(c) What is type inferencing used in ML? [6+6+4]
5. Compare the parameter passing mechanisms of ALGOL and ADA languages. [16]
6. (a) What is thread of control in a program?
(b) Describe actions of the wait and release operations for semaphores.
(c) Specially what Java program unit can run concurrently with the main method
in a application program. [4+6+6]
7. (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]
8. (a) Explain the character string operation called pattern matching.
(b) State whether the languages that have dynamic type binding for variables
must be implemented using pure interpreters or compilers. Explain why?
(c) What are dangling pointers and lost-heap dynamic variables? Give solutions
to the dangling pointer problem . [4+4+8]

?????

You might also like