JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

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

B.Tech | III Year | I Semester | R18 | August - 2022

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

Answer any five questions. All questions carry equal marks.

Main

115 marks
a

Describe the criteria of success for a good programming language.

7 marks

Answer

A successful programming language is evaluated based on several key criteria that determine its usability, reliability, and efficiency:

  • Readability: The ease with which programs can be read and understood. This is influenced by simplicity, orthogonality, control structures, and data types.
  • Writability: The ease with which a language can be used to create programs. It depends on the expressivity of the language, support for abstraction, and the presence of powerful built-in features.
  • Reliability: A language is reliable if it performs to its specifications under all conditions. Key factors include type checking, exception handling, and aliasing restrictions.
  • Cost: This includes the cost of training programmers, writing code, compiling, executing, and maintaining the software.
  • Generality: The applicability of the language to a wide range of problem domains.
  • Extensibility: The ability of the language to allow users to add new features or data types.
b

What is the difference between a phase and a pass of a compiler? Under what circumstances do a compiler have multiple phases?

8 marks

Answer

A phase is a logically distinct step in the compilation process where the compiler performs a specific task, such as lexical analysis, syntax analysis, or code generation. A pass refers to the traversal of the entire source program or its intermediate representation by the compiler. A single pass may involve multiple phases, or a single phase may be split across multiple passes.

Compilers use multiple phases for the following reasons:

  • Complexity Management: Breaking the compilation process into smaller, manageable phases simplifies the design and implementation of the compiler.
  • Portability: By separating machine-independent phases (like parsing) from machine-dependent phases (like code generation), the compiler can be easily adapted to different hardware architectures.
  • Optimization: Multiple phases allow for iterative analysis of the code, enabling more sophisticated optimizations that would be impossible in a single pass.
  • Memory Constraints: In environments with limited memory, the compiler may need to process the code in multiple passes to avoid loading the entire program representation into memory at once.
215 marks
a

Exception handling is very important, but often neglected by programming languages. Comment on it.

5 marks

Answer

Sign in to view the complete answer paper.

b

Give the attribute grammar for a simple assignment statement.

5 marks

Answer

Sign in to view the complete answer paper.

c

Write a denotation semantics mapping function for “for” statement in Ada.

5 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

Explain about static binding and dynamic binding with its relative merits and demerits.

8 marks

Answer

Sign in to view the complete answer paper.

b

What are the design issues of logically controlled loop statements? Explain briefly.

7 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

What is meant by type compatibility? Explain with an example.

7 marks

Answer

Sign in to view the complete answer paper.

b

Discuss the design and implementation issues of pointer data types.

8 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

Describe pass-by-value and pass-by-result parameter passing methods with examples.

8 marks

Answer

Sign in to view the complete answer paper.

b

What are the distinct semantic models for formal parameters? Explain.

7 marks

Answer

Sign in to view the complete answer paper.

6

List and explain various functional characteristics of OOP in Small Talk and C++.

15 marks

Answer

Sign in to view the complete answer paper.

7

Explain exception propagation and exception handling in C++ with illustrative examples.

15 marks

Answer

Sign in to view the complete answer paper.

815 marks
a

Write down the applications of logic programming.

7 marks

Answer

Sign in to view the complete answer paper.

b

Explain the pragmatics of scripting languages.

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 CSE III Year I Semester, August - 2022, 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...