0% found this document useful (0 votes)
33 views5 pages

21CS515PE - PPL Question Bank

ppl question bank

Uploaded by

SRI LATHA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views5 pages

21CS515PE - PPL Question Bank

ppl question bank

Uploaded by

SRI LATHA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

21CS515PE : Principles of Programming Languages

Question Bank
Short answer questions
UNIT 1
1. Specify influences on Language design.
2. Illustrate ambiguous grammar with an example.
3. Define syntax and semantics.
4. What is derivation and a parse tree? Write their significance with examples.
5. In what way do operational semantics differ from denotational semantics?
6. A programming language can be compiled or interpreted. Give relative advantages and
disadvantages of compilation and interpretation.
7. Explain about the Virtual Machine.
8. What are the uses of attribute grammar?
9. List the principal phases of compilation.
10. Compute the weakest precondition for the following sequences of assignment statements and
their post conditions: a = 2 * b + 1;
b=a-3{b<0}
UNIT 2
1. Compare record and union.
2. Write short notes on guarded commands.
3. What is the scope and life time of a variable? Explain.
4. How pointers are represented and used in C and C++?
5. Explain about the problems in unconditional branching
6. Explain about the enumerated data type.
7. Differentiate between user defined and primitive data types with an example.
8. What is aliasing? What are the problems associated with it?
9. Give an unambiguous grammar for if-then-else.
10. Write the difference between a C++ pointer and a Java reference variable.

UNIT 3

1. What are called recursive subprograms?


2. Write about generic subprograms .
3. Define data abstraction.
4. What is a Co-routine? Explain.
5. What are the different categories of subprograms?
6. Why does Java not have a destructors?
7. Explain about the local referencing environments.
8. Explain the design issues for functions
9. Differentiate between actual and formal parameters.
10. What are the three general characteristics of subprograms?
11. Define abstract data type.
12. What is the purpose of a C++ destructor?
13.What is procedural abstraction? Give example.

UNIT 4
1. Explain about message passing.
2.What is the purpose of the Java Finally clause?
3.What advantages do monitors have over semaphores? Discuss.
4.Distinguish between Competitive Synchronization and Cooperation synchronization.
5. Compare semaphores with monitors
6. What is the difference between checked and unchecked exception in java.
7.What are the design issues of an exception handling system.

UNIT 5
1. List applications of Logic programming.
2. List and summarize module libraries in python.
3.Specify Inference process of prolog.
4.What are the data types supported in Python?
5. Discuss the storage and Control in python.
6. Explain about the fundamentals of FPL.
7.. What are the applications of functional programming languages?
8. Draw the internal representation of two LISP lists.
9. What are the important functions of LISP.
10.What are basic primitives of LISP.

Long answer questions


UNIT 1
1. What are various language evaluation criteria and the characteristics that affect them? Discuss.
Explain about various programming domains along with their features and associated languages.

2. Define grammars, derivation and parse tree. Construct parse tree for simple assignment
statement A=B*(A+C)

3. Explain about denotational semantics and axiomatic semantics for common programming
language features.
4.Explain about programming domains and their associated languages.

Distinguish between ambiguous grammar and attribute grammar with an example.

5. Write BNF and EBNF versions of expression grammar.

6. What are the three general methods of implementing a programming language?

7. Draw and explain the flowchart for compilation process.

8.When do you say grammar is ambiguous?

9. Explain the different categories of languages.

10.Explain in detail about attribute grammar and also write the attribute grammar for simple
assignment statements.

UNIT 2
1.Define an array. Explain how to initialize an array? Explain different types of arrays.

2.Describe the different types of assignment statements.

3.What is short-circuit evaluation?

4.Explain the different types of union with an example.

5.Explain scope and lifetime of variables with examples.

6.Explain about control structures with an example.

7. Define stack, stack-dynamic, explicit heap dynamic and implicit heap dynamic variables. State
their advantages and disadvantages.

8.What do you mean by binding? Give examples of some of the bindings and their binding times.

9.What are the design choices for string length?

10. Discuss about guarded commands with an example.

11.What do you mean by binding? Give examples of some of the bindings and their binding
times
UNIT-3
1. Write about parameterized abstract datatypes with an example in C++.

2. Describe shallow-access method of implementing dynamic scoping?

3. Explain the different parameter passing methods with examples.

4. What is an overloaded subprogram, explain with an example.

5. Explain about information hiding provided in an ADA package.

6. Explain how subprograms are passed as parameters. Illustrate with examples.

7. Explain about the generic subprograms with an example.

8. Explain about co-routines with an example.

9. Explain the design issues of subprograms and operations.

10.Write a short note on data and procedural abstraction.

UNIT-4
1. Explain in detail about exception handling in Ada.

2. Write a brief note on C# threads.

3. What is semaphore. Explain the different types of semaphores.

4. Describe the actions of the three java methods that are used to support cooperation
synchronization.

5. Explain how to handle exceptions in C++.

6. How is message passing implemented in Ada? Give examples.

7. Briefly explain subprogram level concurrency.

8.What are various methods of exception handling? Discuss.

9. Elaborate how message passing helps in concurrency control? Explain with an example.

10.What is the difference between checked and unchecked exceptions in Java?


.

UNIT-5
1.What are the applications of functional programming? Explain.

2.Compare the functional programming languages with imperative languages.

3.Write a LISP function Fib(n) that computes nth Fibonacci number.

4.Explain about the internal representation of two LISP lists.

5.Write the operations that can be performed on atoms and lists in LISP.

6.Write a procedure in python to find greatest common divisor of two numbers.

7. What are the features of Prolog? Discuss the basic elements of Prolog with examples.

8.Explain about fact and rule statements of prolog.

9.Explain various storage and control statements available in python.

10. What are the datatypes supports in python? Discuss.

You might also like