JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech III PRINCIPLES OF PROGRAMMING LANGUAGES Previous Question Paper (September - 2021 - R18)

B.Tech | III | I | R18 | September - 2021

Answer PaperPaper Code: 155CXMaximum Marks: 75Time: 3 hours

Answer any five questions. All questions carry equal marks.

Main

115 marks
a

What are the potential benefits of studying programming language concepts?

7 marks

Answer

Studying programming language concepts provides several key benefits for software developers:

  • Increased capacity to express ideas: Understanding a wider range of constructs allows programmers to choose the most appropriate language features to solve specific problems efficiently.
  • Improved background for choosing appropriate languages: Knowledge of language paradigms and design trade-offs enables developers to select the best tool for a given project.
  • Increased ability to learn new languages: Once the underlying principles—such as scoping, binding, and type systems—are understood, learning a new language becomes a matter of learning its specific syntax.
  • Better understanding of implementation significance: Understanding how features like recursion or polymorphism are implemented helps programmers write more performant code and debug complex issues.
  • Enhanced ability to design new languages: For those involved in tool creation, understanding language design principles is essential for building robust and usable languages.
b

Explain the process of compilation with neat flow diagram.

8 marks

Answer

Compilation is the process of translating high-level source code into machine-executable code. The process follows a sequence of phases:

  1. Lexical Analysis (Scanning): Converts the source code into a stream of tokens.
  2. Syntax Analysis (Parsing): Organizes tokens into a hierarchical structure, typically a parse tree or abstract syntax tree, based on the language grammar.
  3. Semantic Analysis: Checks for semantic consistency, such as type checking and scope resolution.
  4. Intermediate Code Generation: Produces a machine-independent intermediate representation.
  5. Code Optimization: Improves the intermediate code to make the final program faster or smaller.
  6. Code Generation: Translates the optimized intermediate code into target machine code.

Flow Diagram Description: Source Program -> [Lexical Analyzer] -> Tokens -> [Syntax Analyzer] -> Syntax Tree -> [Semantic Analyzer] -> Intermediate Representation -> [Code Optimizer] -> Optimized IR -> [Code Generator] -> Target Machine Code. Throughout these phases, a Symbol Table is maintained to store information about identifiers.

215 marks
a

Explain the characteristics of writability of a programming language.

7 marks

Answer

Sign in to view the complete answer paper.

b

Prove that the following grammar is ambiguous:

<S>→<A>
<A>→<A>+<A>|<id>
<id>→a|b|c
8 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

Write the process of implementing pointer and reference types.

8 marks

Answer

Sign in to view the complete answer paper.

b

Discuss about different assignment statements.

7 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

How stack dynamic variables differs with heap dynamic variables?

8 marks

Answer

Sign in to view the complete answer paper.

b

Explain the design issues of multiple selection constructs.

7 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

Describe the following parameter passing mechanisms:

i) Pass-by-value-result

ii) Pass-by-Reference

8 marks

Answer

Sign in to view the complete answer paper.

b

In what way coroutines different from conventional subprograms?

7 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

Describe the deep-access method of implementing dynamic scoping.

8 marks

Answer

Sign in to view the complete answer paper.

b

What is parameterized ADT? How Java supports parameterized ADT?

7 marks

Answer

Sign in to view the complete answer paper.

715 marks
a

How Ada supports concurrency? Explain.

7 marks

Answer

Sign in to view the complete answer paper.

b

Define Thread. How thread synchronization is achieved in C#?

8 marks

Answer

Sign in to view the complete answer paper.

815 marks
a

Explain about fact and rule statements of Prolog.

7 marks

Answer

Sign in to view the complete answer paper.

b

Write a procedure in Python to find the greatest common divisor of two numbers.

8 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of PRINCIPLES OF PROGRAMMING LANGUAGES from JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD for B.Tech IT III I, September - 2021, R18.

For the solved question paper with answers, switch to the Answer Paper tab.

Other papers in PRINCIPLES OF PROGRAMMING LANGUAGES

Loading Question Papers

Fetching data from database...