JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech II PRINCIPLES OF PROGRAMMING LANGUAGES Previous Question Paper (December - 2017 - R15)
Note: This question paper contains two parts A and B. Part A is compulsory which carries 25 marks. Answer all questions in Part A. Part B consists of 5 Units. Answer any one full question from each unit. Each question carries 10 marks and may have a, b, c as sub questions.
Part A
Define Syntax.
Answer
Syntax refers to the set of rules that define the structure and form of statements, expressions, and programs in a programming language. It specifies how symbols and tokens must be arranged to form valid constructs, independent of their meaning.
What is aliasing?
Answer
Aliasing occurs when two or more distinct names or variables in a program refer to the same memory location. This can happen through the use of pointers, reference variables, or shared global variables, and it can make program analysis and debugging difficult because changing the value through one name affects the other.
What is an access function for an array?
Answer
Sign in to view the complete answer paper.
What are the two common problems with pointers?
Answer
Sign in to view the complete answer paper.
What is parameter profile?
Answer
Sign in to view the complete answer paper.
What are actual parameters?
Answer
Sign in to view the complete answer paper.
What do you mean by friend function?
Answer
Sign in to view the complete answer paper.
Why does Java not have destructors?
Answer
Sign in to view the complete answer paper.
Define referential transparency.
Answer
Sign in to view the complete answer paper.
What data types were parts of the original LISP?
Answer
Sign in to view the complete answer paper.
Part B
What are the three general methods of implementing a programming Language?
Answer
Sign in to view the complete answer paper.
In What fundamental way do operational semantics and denotational semantics differ? Discuss briefly.
Answer
Sign in to view the complete answer paper.
Write EBNF descriptions for a Java Class definition header statement.
Answer
Sign in to view the complete answer paper.
Write EBNF descriptions for a C switch statement.
Answer
Sign in to view the complete answer paper.
Give an overview of subscript bindings and array categories.
Answer
Sign in to view the complete answer paper.
Why reference variables in C++ better than pointers for formal parameters? Explain with an example.
Answer
Sign in to view the complete answer paper.
Discuss about various attributes of a variable.
Answer
Sign in to view the complete answer paper.
Give an illustration of ‘assignment as an expression’ and the disadvantages of the same.
Answer
Sign in to view the complete answer paper.
Distinguish between co routines and subprograms.
Answer
Sign in to view the complete answer paper.
Illustrate with examples static and stack-dynamic local variables.
Answer
Sign in to view the complete answer paper.
Consider the following program written in C syntax:
void fun (int first, int second) { first += first; second += second; }
void main() { int list[2] = {1, 4}; fun(list[0], list[1]); }
For each of the following parameter-passing methods, what are the values of the list array after execution?
i) Passed by reference
ii) Passed by value-result.
Answer
Sign in to view the complete answer paper.
What are the design issues for functions? Discuss briefly.
Answer
Sign in to view the complete answer paper.
What are the problems with semaphores for providing competition synchronization? Explain how monitors provide competition synchronization without these problems.
Answer
Sign in to view the complete answer paper.
What is the difference between checked and unchecked exceptions in Java? Illustrate with an example.
Answer
Sign in to view the complete answer paper.
Write about the following Functional Languages:
HASKELL
Answer
Sign in to view the complete answer paper.
ML
Answer
Sign in to view the complete answer paper.
Explain the following with respect to Python:
Data types
Answer
Sign in to view the complete answer paper.
Iterative commands
Answer
Sign in to view the complete answer paper.
Class
Answer
Sign in to view the complete answer paper.