Previous year paper

(SEM V) THEORY EXAMINATION 2018-19 PRINCIPLES OF PROGRAMMING LANGUAGES

Engineering B.Tech 0 downloads

About this previous year paper

PRINCIPLES OF PROGRAMMING LANGUAGES (RCS-503)


B.Tech | Semester V | Section-wise Important Questions & Notes


SECTION A – Very Short Answer (2 × 7 = 14 marks)


This section focuses on basic concepts, definitions, and differences. Answers should be short and precise.


 Important Questions


Differentiate between Error and Exception.                 Define Class and Object briefly.

List different times at which Binding can take place.    Explain Aliasing for Data Objects with an example.

Differentiate between Widening and Narrowing Conversion.

What is Type Conversion?                                            Define Referencing Environment.


Key Notes


Error: Compile-time or logical mistake; Exception: Runtime abnormal condition.

Class is a blueprint; Object is an instance of a class.

Binding times: Language design time, compile time, load time, run time.

Aliasing occurs when two names refer to the same memory location.

Widening is safe conversion (int → float), Narrowing may cause data loss.


SECTION B – Short Answer (5–7 marks)


This section requires explanation with examples and sometimes diagrams.


Important Questions


Explain Binding and Binding Time with examples.

Describe Aliasing and its advantages and disadvantages.

Explain Type Checking and Type Conversion.                      Discuss Scope and Lifetime of Variables.

Explain Static and Dynamic Binding.


 Key Notes


Binding: Association between an entity and its attribute.

Static binding happens before runtime; Dynamic binding occurs during execution.

Scope refers to visibility of a variable, while lifetime refers to duration in memory.

Type checking ensures correctness of operations at compile or runtime.


 SECTION C – Long Answer (Compulsory / High-Weight)

This section tests deep conceptual understanding and program analysis.


Most Important Question


Explain Associations and Referencing Environment.

Also explain different components of the referencing environment with respect to the given program.

Program Given (From Paper)

 

program main; var A, B, C: real; procedure S1(A: real); var D: real; begin  Statements end; begin  Statements  S1(A);  Statements end;


Key Notes for Answer

Association: Relationship between names and memory locations.

Referencing Environment: Set of variable names visible at a given point in the program.

Components include:

Local variables

Non-local variables

Global variables

Parameters

For main: A, B, C are visible.

For S1: Local variable D, parameter A, and global variables are considered based on scope rules.

Explain with static vs dynamic scoping.

TypePrevious year paper
SubjectEngineering
Board / courseB.Tech
FilePDF · 41.1 KB
Shared by SuGanta International

Added by the SuGanta team.