3
BIRLA INSTITUTE OF TECHNOLOGY INTERNATIONAL CENTER, RAK- UAE Department: CS Class: B.E. Question Bank No: 1 Semester: VII Subject: Principles of programming languages Subject Code: CP 7101 Date of question bank given: 19/10/08 Module I Syllabus Covered: Introduction: Programming Linguistics, Historical Development Concurrency: Why concurrency. Programs and processes, Problems with concurrency, Process interactions, Concurrency primitives, Concurrent control abstractions Imperative programming: Key concepts, Pragmatics, Case study:C, Case study:ADA. Object oriented programming Key concepts, Pragmatics, Case study: C++, Case study:ADA,Case study:JAVA Question bank 1. What are the fundamental requirements a programming language must satisfy? 2. Define Syntax, semantics, and pragmatics of a programming language? 3. Give a brief on historical development of programming language? 4. What is concurrent programming? Why concurrency is needed? 5. What are the problems with concurrency? 6. What is race condition? What is a solution for this? 7. What is Deadlock? What are the conditions hold for it? 8. Define a) Independent processes b) Competing processes c) Communicating processes 9. Differentiate process and thread? 10. What are the primitive operations on processes? 11. What is a Spin lock? 12. What is an interrupt? 13. Explain a) Dekker’s algorithm b) Peterson’s algorithm c) Simpson’s algorithm? 14. Explain a) Event b) Semaphores c) Messages d) Remote procedure call? 15. What is meant by a) Conditional Critical regions b) Monitors c) Rendezvous? 16. What is Imperative programming? What are its key concepts? 17. Explain the pragmatics of Imperative programming? 18. Explain Procedural abstraction in the case of C? 19. What is independent compilation? 20. Explain with examples pass- by- value and pass- by- reference parameter pass- ing techniques? 21. Explain type checking technique in parameter passing? 22. What is a Preprocessor directive? 23. What is Object oriented programming? What are its key concepts? 24. Explain the pragmatics of Object oriented programming? 25. Explain the following terms : (a) Message passing (b) Concurrency in Ada (c) Monitors 26. Explain Procedural abstraction, Generic abstraction &Data abstraction in C++? 27. Explain Procedural abstraction, Generic abstraction &Data abstraction in ADA? 28. Explain Procedural abstraction, Generic abstraction &Data abstraction in JAVA?

73892325 Principles of Programming Languages Question Bank

Embed Size (px)

DESCRIPTION

ppl

Citation preview

Page 1: 73892325 Principles of Programming Languages Question Bank

BIRLA INSTITUTE OF TECHNOLOGY INTERNATIONAL CENTER, RAK- UAE

Department: CS Class: B.E. Question Bank No: 1

Semester: VII Subject: Principles of programming languages Subject Code: CP 7101 Date of question bank given: 19/10/08

Module – I

Syllabus Covered:

Introduction: Programming Linguistics, Historical Development

Concurrency: Why concurrency. Programs and processes, Problems with concurrency, Process interactions,

Concurrency primitives, Concurrent control abstractions

Imperative programming: Key concepts, Pragmatics, Case study:C, Case study:ADA.

Object oriented programming Key concepts, Pragmatics, Case study: C++, Case study:ADA,Case study:JAVA

Question bank

1. What are the fundamental requirements a programming language must satisfy?

2. Define Syntax, semantics, and pragmatics of a programming language?

3. Give a brief on historical development of programming language?

4. What is concurrent programming? Why concurrency is needed?

5. What are the problems with concurrency?

6. What is race condition? What is a solution for this?

7. What is Deadlock? What are the conditions hold for it?

8. Define a) Independent processes b) Competing processes c) Communicating processes

9. Differentiate process and thread?

10. What are the primitive operations on processes?

11. What is a Spin lock?

12. What is an interrupt?

13. Explain a) Dekker’s algorithm b) Peterson’s algorithm c) Simpson’s algorithm?

14. Explain a) Event b) Semaphores c) Messages d) Remote procedure call?

15. What is meant by a) Conditional Critical regions b) Monitors c) Rendezvous?

16. What is Imperative programming? What are its key concepts?

17. Explain the pragmatics of Imperative programming?

18. Explain Procedural abstraction in the case of C?

19. What is independent compilation?

20. Explain with examples pass- by- value and pass- by- reference parameter pass-

ing techniques?

21. Explain type checking technique in parameter passing?

22. What is a Preprocessor directive?

23. What is Object oriented programming? What are its key concepts?

24. Explain the pragmatics of Object oriented programming?

25. Explain the following terms :

(a) Message passing

(b) Concurrency in Ada

(c) Monitors

26. Explain Procedural abstraction, Generic abstraction &Data abstraction in C++?

27. Explain Procedural abstraction, Generic abstraction &Data abstraction in ADA?

28. Explain Procedural abstraction, Generic abstraction &Data abstraction in JAVA?

Page 2: 73892325 Principles of Programming Languages Question Bank

BIRLA INSTITUTE OF TECHNOLOGY INTERNATIONAL CENTER, RAK- UAE

Department: CS Class: B.E. Question Bank No: 2

Semester: VII Subject: Principles of programming languages Subject Code: CP 7101

Syllabus Covered:

Module-II

DATA ABSTRACTION: Program units, packages, and encapsulation, Abstract types, Objects and classes,

Implementation notes.

GENERIC ABSTRACTION: Generic units and instantiation, Type and class parameters, Implementation

notes.

TYPE SYSTEMS: Inclusion polymorphism, Parametric polymorphism, Overloading, Type conversions,

Implementation notes.

CONTROL FLOW: Sequencers, Jumps, Escapes, Exceptions, Implementation notes

Question bank

1. Define Program units, packages, and encapsulation

2. What is an abstract class? How it differs from ordinary classes

3. What is inheritance? Explain subclass and super class?

4. Differentiate single and multiple inheritance?

5. How can a method is overridable in JAVA&C++?

6. What is meant by dynamic dispatch?

7. What are Interfaces? Explain JAVA Interface?

8. Explain

a) Dekker’s algorithm

b) Peterson’s algorithm

c) Simpson’s algorithm?

9. Explain

a) sequencers

b) jumps

c) escapes

d) exceptions

10. What is Inclusion polymorphism?

11. What is Polymorphic procedure?

12. Explain Type inference?

13. What is Overloading? Differentiate context-independent and context-dependent overloading?

14. Differentiate between function overloading and operator overloading?

15. What are Generic units and its instantiation? Explain generic packages in ADA?

16. What is type parameter? Explain with example?

17. What is class parameter? Explain with example?

18. What is a type conversion? Differentiate coercions and casts?

19. Type conversion provides more flexibility to the user. Comment on it?

20. Explain the following terms:

(a) Generic function

(b) Overloaded operator

(c) Functions

(d) Call-by-text

Page 3: 73892325 Principles of Programming Languages Question Bank

BIRLA INSTITUTE OF TECHNOLOGY INTERNATIONAL CENTER, RAK- UAE

Department: CS Class: B.E. Question Bank No: 3

Semester: VII Subject: Principles of programming languages Subject Code: CP 7101

Syllabus Covered

Module-III

CONCURRENT PROGRAMMING: Key concepts, Pragmatics, Case study: ADA95, Case study: JAVA,

Functional Programming: Key concepts, Pragmatics, Case study: HASKELL.

Logic Programming: Key concepts, Pragmatics, Case study: PROLOG

Scripting: Pragmatics Key concepts, Case study: PYTHON.

1. What are the key concepts of fuctional programming?

2. Write short notes on

a. Eager evaluation

b. Normal-order evaluation

c. Lazy evaluation

3. What is Church–Rosser Property?

4. Explain HASKELL list comprehensions?

5. What is called a curried function?

6. What is called partial application?

7. How two functions are combined in HASKELL?

8. Explain Horn clauses?

9. What are the key concepts of logic programming?

10. What features of PROLOG classify it as a logic programming language?

11. Explain Assertions and clauses in PROLOG?

12. Explain the closed world assumption used by prolog. Why is this a limitation?

13. How can a variable be universally quantified or existentially quantified?

14. Explain the applications of functional programming languages.

15. Explain back tracking?

16. What is meant by cut? What is its use?

17. What are the characteristics of scripting languages?

18. Explain regular expressions?

19. PYTHON modules are compiled separately. Comment it?

20. PYTHON supports function procedures and proper procedures.Expalin?

21. How data abstraction is done in PYTHON?

22. Type conversion provides more flexibility to the user. Comment on it?

23. Define union. What is the difference between record and union. Explain how

union is supported by different programming languages?

24. Write the different classes of exceptions in java.

25. Explain the basic concepts of exception handling?

Text Book:

1. David A. Watt – Programming Language Design Concepts, John Wiley, India Edition,

2004.

Reference Books:

1. 1. R. Sethi and K.V. Viswanatha – Programming Languages: Conupt & Constructs, 2/e,

New Delhi-2007.

2. 2. D.Appleby & J.J.Vanda Kopple – Programming Languages: Paradigm and Practice

2/e, TMH, New Delhi – 2005.

3. 3. K.C. Louden – Programming Languages: Principles and Practice, 2/e, Thomson

Learning India Edition,