JNTU
JNTU B.Tech III PRINCIPLES OF PROGRAMMING LANGUAGES Previous Question Paper (March-2024 - R13)
Note: i) Question paper consists of Part A, Part B. ii) Part A is compulsory, which carries 25 marks. In Part A, answer all questions. iii) In Part B, Answer any one question from each unit. Each question carries 10 marks and may have a, b as sub questions.
Part A
Define parse tree and provide an example.
Answer
A parse tree is a graphical representation of the derivation of a string from a context-free grammar, where the root is the start symbol, internal nodes are non-terminals, and leaves are terminals. For a grammar S -> aSb | ab, the parse tree for string 'aabb' has S as the root, with children 'a', S, and 'b', where the inner S branches into 'a', 'b'.
Give an example of ambiguous grammer.
Answer
A grammar is ambiguous if it generates more than one parse tree for a single string. A classic example is the expression grammar: E -> E + E | E * E | id. For the string id + id * id, this grammar allows two distinct parse trees, one prioritizing the addition and the other prioritizing the multiplication.
What do you mean by short-circuit evaluation?
Answer
Sign in to view the complete answer paper.
What is an associative array?
Answer
Sign in to view the complete answer paper.
Define sub program.
Answer
Sign in to view the complete answer paper.
What are the design issues of sub-programs?
Answer
Sign in to view the complete answer paper.
What is a semaphore?
Answer
Sign in to view the complete answer paper.
Define concurrency. State the need for concurrency.
Answer
Sign in to view the complete answer paper.
What are the features of Haskell?
Answer
Sign in to view the complete answer paper.
Compare functional languages and procedural languages.
Answer
Sign in to view the complete answer paper.
Part B
A programming language can be compiled or interpreted. Give relative advantages and disadvantages of compilation and interpretation. Give examples of compiled and interpreted languages.
Answer
Sign in to view the complete answer paper.
In what way do operational semantics differ from denotational semantics? Explain.
Answer
Sign in to view the complete answer paper.
List and explain the reasons for studying concepts of programming languages.
Answer
Sign in to view the complete answer paper.
What purpose do predicates serve in attribute grammar? Give illustrations.
Answer
Sign in to view the complete answer paper.
Define Data Type. Explain in detail various primitive data types.
Answer
Sign in to view the complete answer paper.
Explain the compound statements.
Answer
Sign in to view the complete answer paper.
Difference between pointer and references.
Answer
Sign in to view the complete answer paper.
Discuss the variable initialization and variable definition.
Answer
Sign in to view the complete answer paper.
Explain the design issues for all the iterative control statements.
Answer
Sign in to view the complete answer paper.
Give an overview of relational and problem expressions.
Answer
Sign in to view the complete answer paper.
Discuss the scope and lifetime of the variable.
Answer
Sign in to view the complete answer paper.
Discuss the design issues of subprograms.
Answer
Sign in to view the complete answer paper.
What do you mean by local referencing environment? Explain.
Answer
Sign in to view the complete answer paper.
Explain how Binary semaphore provides the solution to the competition synchronization problem with example pseudo-code.
Answer
Sign in to view the complete answer paper.
What is exception handling? Explain exception handling in Java.
Answer
Sign in to view the complete answer paper.
Give an overview of Java threading.
Answer
Sign in to view the complete answer paper.
What are the basic elements of prolog? Explain.
Answer
Sign in to view the complete answer paper.
Write down the features of functional and imperative languages.
Answer
Sign in to view the complete answer paper.
Explain bindings and scope in python.
Answer
Sign in to view the complete answer paper.
Explain the fundamentals of Functional Programming language.
Answer
Sign in to view the complete answer paper.
List and explain the common characteristics of the scripting languages.
Answer
Sign in to view the complete answer paper.