JNTU

JNTU B.Tech III PRINCIPLES OF PROGRAMMING LANGUAGES Previous Question Paper (August/September - 2024 - R13)

B.Tech | III | I | R13 | August/September - 2024

Answer PaperPaper Code: 115ANMaximum Marks: 75Time: 3 hours

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

(25 Marks)

125 marks
a
What are attributed grammars? Give examples.
2 marks

Answer

Attributed grammars are an extension of context-free grammars where each grammar symbol is associated with a set of attributes. These attributes can hold semantic information about the program construct represented by the symbol. Attributes can be of two types: synthesized (computed from children) and inherited (passed down from parent).

Example:

Consider a simple grammar for arithmetic expressions:

E -> E + T | T

T -> T * F | F

F -> ( E ) | id

With attributed grammars, we can add attributes to track the value of the expression. For instance, for the non-terminal 'E', we can have a synthesized attribute 'val' which stores the computed value of the expression.

E.val = E1.val + T.val

E.val = T.val

T.val = T1.val * F.val

T.val = F.val

F.val = E.val

F.val = id.value

b
Discuss about virtual machines.
3 marks

Answer

A virtual machine (VM) is a software-based emulation of a physical computer. It runs on top of a host operating system and provides an environment where applications can execute as if they were running on their own dedicated hardware. VMs abstract the underlying hardware, allowing multiple operating systems and applications to run concurrently on a single physical machine.

Key aspects include:

  • Abstraction: VMs hide the complexities of the physical hardware from the guest operating system and applications.
  • Isolation: Each VM is isolated from the host system and other VMs, enhancing security and stability. If one VM crashes, it doesn't affect others.
  • Portability: VMs can be easily moved or copied between different physical machines, facilitating development, testing, and deployment.
  • Resource Management: The hypervisor (VM monitor) manages and allocates physical resources (CPU, memory, storage, network) to the VMs.

Examples include VMware, VirtualBox, and Hyper-V.

c
What is meant by short circuit evaluation of an expression?
2 marks

Answer

Sign in to view the complete answer paper.

d
Explain about guarded commands.
3 marks

Answer

Sign in to view the complete answer paper.

e
What does it mean by Scope and lifetime of variable?
2 marks

Answer

Sign in to view the complete answer paper.

f
What are called recursive subprograms? Explain.
3 marks

Answer

Sign in to view the complete answer paper.

g
State Inference process of prolog.
2 marks

Answer

Sign in to view the complete answer paper.

h
What are the applications of logic programming?
3 marks

Answer

Sign in to view the complete answer paper.

i
What are the applications of functional programming languages?
2 marks

Answer

Sign in to view the complete answer paper.

j
What is procedural abstraction? Give example.
3 marks

Answer

Sign in to view the complete answer paper.

Unit I

210 marks
a
What are the important factors influencing the writability of a language? Discuss.
5 marks

Answer

Sign in to view the complete answer paper.

b
Construct the parse tree for the simple statement: A := B * (A + C).
5 marks

Answer

Sign in to view the complete answer paper.

OR
310 marks
a
Explain about various programming domains and their associated languages.
5 marks

Answer

Sign in to view the complete answer paper.

b
Discuss the significance of logic programming in detail.
5 marks

Answer

Sign in to view the complete answer paper.

Unit II

410 marks
a
What are the problems associated with Unconditional Branching? Explain with examples.
5 marks

Answer

Sign in to view the complete answer paper.

b
Discuss about various design issues of character string types.
5 marks

Answer

Sign in to view the complete answer paper.

OR
510 marks
a
What are dangling pointers and lost heap-dynamic variables? How are they created? Explain.
5 marks

Answer

Sign in to view the complete answer paper.

b
Explain the different types of Union with examples.
5 marks

Answer

Sign in to view the complete answer paper.

Unit III

610 marks
a
With examples, explain the problem of passing multi-dimensioned arrays as parameters.
5 marks

Answer

Sign in to view the complete answer paper.

b
Discuss in detail about the significance of Co-Routines with examples.
5 marks

Answer

Sign in to view the complete answer paper.

OR
710 marks
a
Explain type checking technique in parameter passing. Give suitable example.
5 marks

Answer

Sign in to view the complete answer paper.

b
Describe about the static and dynamic scope of variables with an example.
5 marks

Answer

Sign in to view the complete answer paper.

Unit IV

810 marks
a
What are the basic elements of Prolog? Discuss.
5 marks

Answer

Sign in to view the complete answer paper.

b
How to handle exceptions in Ada? Explain.
5 marks

Answer

Sign in to view the complete answer paper.

OR
910 marks
a
List and explain different types of propositions present in logic programming.
5 marks

Answer

Sign in to view the complete answer paper.

b
Demonstrate the concept of abstraction and encapsulation with suitable examples.
5 marks

Answer

Sign in to view the complete answer paper.

Unit V

1010 marks
a
Make a comparison between imperative and functional languages.
5 marks

Answer

Sign in to view the complete answer paper.

b
Write a LISP function fib(n) that computes nth Fibonacci number.
5 marks

Answer

Sign in to view the complete answer paper.

OR
1110 marks
a
Write a detailed note on Scripting languages.
5 marks

Answer

Sign in to view the complete answer paper.

b
How the storage and control is handled in Python? Explain.
5 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the solved question paper with answers of PRINCIPLES OF PROGRAMMING LANGUAGES from JNTU for B.Tech CSE III I, August/September - 2024, R13.

For the question paper without answers, switch to the Question Paper tab.

Other papers in PRINCIPLES OF PROGRAMMING LANGUAGES

Loading Question Papers

Fetching data from database...