Course Name : Principles of Programming language


Date of Unit Completion & Remarks



Download 0.67 Mb.
Page2/5
Date28.01.2017
Size0.67 Mb.
#9067
1   2   3   4   5

Date of Unit Completion & Remarks


Unit – 1

Date

:

__ / __ / __

Remarks:


­­­­­­­­­________________________________________________________________________
________________________________________________________________________



Unit – 2

Date

:

__ / __ / __

Remarks:
­­­­­­­­­________________________________________________________________________


________________________________________________________________________



Unit – 3

Date

:

__ / __ / __

Remarks:
­­­­­­­­­________________________________________________________________________


________________________________________________________________________



Unit – 4

Date

:

__ / __ / __

Remarks:
­­­­­­­­­________________________________________________________________________


________________________________________________________________________





Unit – 5

Date

:

__ / __ / __

Remarks:
­­­­­­­­­________________________________________________________________________


________________________________________________________________________




Unit Wise Assignments (With different Levels of thinking (Blooms Taxonomy))

Note: For every question please mention the level of Blooms taxonomy


Unit – 1

1.

Write about linker? Explain the responsibilities of the linker? L1

2.

Explain the different aspects of cost of a programming language? L4

3.

What common programming language statements in your opinion is most deter to readability? L3

4.

Define CFG. State whether CFG is a language generator or recognizer? L1

5.

Explain with an example how operator associativity can be incorporated in grammars?

L4


Unit – 2

1.

Define strong typing. Discuss how type checking is enforced in Fortran95, Ada, C, C++, and Java. What do you mean by coercion, how does it effect strongly typed languages? L1

2.

Describe the process of Array initialization? L5

3.

Explain all of the difference between subtypes and derived types? L4

4.


Compare and Contrast union, free union and discriminated union? L4

5.

What are the advantages and disadvantages of allowing mixed-mode arithmetic expressions? L4

6.

Explain the problems associated with Unconditional Branching? L4

7.

List out Errors that can occur in Expression Evaluation? L1

Unit – 3

1.

Explain the Various Design issues that are involved in functions? L6

2.

Difference between procedures and functions? L4


3.

What is the primary problem with using semaphores to provide synchronization? L3

4.

In what different places can the definition of a C++ member function appears? L4

5

What is a C++ Name space? What is it purpose? L2

Unit – 4

1.

Explain in detail about Exception handling in Ada? L4


Unit – 5

1.

Explain the difference between CONS, LIST and APPENED? L4


2.

Write a Lisp function Fib (n) that computes a nth Fibonacci number? L3



Unit Wise Case Studies (With different Levels of thinking (Blooms Taxonomy))

Note: For every Case Study please mention the level of Blooms taxonomy


Unit – 1

1.

Was the first high level programming language you learned, implemented within pure interpreter, a hybrid implementation system or a compiler? If yes, justify? L5

2.

Enumerate evaluation criteria of some programming language? L4

3.

Many contemporary languages allows to kinds of comments: one in which delimiters are used both ends (multiple-line comments) and one in which a delimiter marks only the beginning of the comment (one-like comments). Discuss the advantage and disadvantages of each of these with respect to our criteria? L3

4.

<assign> ­ = L4

<id> A|B|C

<expr> +

|


<term> *

|



<factor> ()

|


Using the above grammer, show a parse tree and a left most derivation for each of the following statemtns.

  1. A=(A+B)*C

  2. A=B+C+A

  3. A=A*(B+C)

  4. A=B*(C*(A+B))

Unit – 2

1.

Assume the following Ada program was complied and executed using static scoping rules. What value of x is printed in procedure sub1? Under dynamic scoping rules, what value of x is printed in procedure sub1? L3

procedure main is

x: integer;

procedure sub1 is

begin

put(x)


end;

procedure sub2 is

x:integer;

begin


x:=10

sub1


end;

begin


x:=5;

sub2


end;

2.

Some programming languages are typeless what are the obvious advantages and disadvantages of having no types in a language? L2

3.

Write a c program the does a large number of references to element of two dimensional arrays, using only subscripting write a second program that does the same operations but uses pointers and pointer arithmetic for the storage mapping function to do the array reference. Compare the time efficiency of the two programs. Which of the two programs is likely to be more reliable? Why? L1

4.

Let the function fun is defined as L3

int fun(int *k)

{

*k+=4;


return 3 *(*k)-1;

}

Suppose fun is used as follows:



void main()

{

int i=10,j=10;sum1,sum2;



sum1=(i/2)+fun(&i);

sum2=fun(&j)+(j/2);

What are the values of sum1 and sum2


  1. If the operands in the expressions are evaluated left to right?

  2. If the operands in the expressions are evaluated right to left?

Unit – 3

1.

Consider the following program L4

void swap(int a, int b)

{

int temp;



temp=a;

a=b;


b=temp;

}

void main()



{

int value=2,list[5]={1,3,5,7,9};

swap(value, list[0]);

swap(list[0], list[1]);

swap(value, list[value]);

}

For each of the following parameters passing methods, what are all of the values of the variables value and list after each of the three calls to swap?



  1. Pass by value

  2. Pass by reference

  3. Passed by value-result




2.

What dangers are avoided in Java and C# by having implicit garbage collector, relative to C++? L2

3.

What is the best action a system can take when deadlock is detected? L2

Unit – 4

1.

In a language with exception handling facilities, it is common to have more subprograms include an “error” parameter, which can be set to same value representing “ok” what advantage does linguistic exception handling facility like that of Ada have over this method? L4

Unit – 5

1.

Design the quick sort algorithm in scheme language? L6

2.

Construct the scheme function that removes the last element from a give list? L6



Unit Wise Important Questions (With different Levels of thinking (Blooms Taxonomy))

Note: For every question please mention the level of Blooms taxonomy


Unit – 1

1.

Explain in detail various phases in the process of compilation? L4


2.

Give an example of how aliasing deters reliability? L3

3.

Why it is useful for a programmer to have some background in language design? L3

4.

Difference between compilation and interpretation? L4

5.

How can knowledge of programming language characteristics benefit the whole computing community? L2

6.

What role does the symbol table play in a complier? L4

7.

In what fundamental way do operational semantics and denotational semantics differ?

L4


8.

Develop an unambiguous grammar that describes the if statement? L3

9.

Discuss the following? L2

1) Assignment statements

2) Logical pretest loops


10.

In what fundamental way do the operational and denotional semantics differ? L3

Unit – 2

1.

Define the following? L1

a) Stack Dynamic

b) Explicit Heap Dynamic

c) Implicit Heap Dynamic

d) Static


2.

Describe how the pointers used in C and C++ with examples? L1

3.

Explain pointers, reference types, design issues of pointers, operations on pointers, pointer problems and implementation of pointer and reference types? L4


4.


Difference between Static and Dynamic strings? L4

5.

How does operand evaluation order interact with functional side effects? L3

6.

Discuss the benefits of operator overloading? L2

7.

Explain in detail multiple selection constructs? L4

8.

Explain about the iteration based Data structures? L4

Unit – 3

1.

What are the modes, the conceptual models of transfer, the advantages and disadvantages of pass by value, pass by result, pass by value-result and pass by reference parameter passing methods? L3

2.

Define Shallow and deep binding for referencing environment of subprograms that have been passed as parameter? L1

3.

Explain the considerations for choosing parameter passing methods? L4


4.

Explain, how multi dimensional arrays can passed as arguments in Ada language? L4


Unit – 4

1.

Classify the difference Physical and logical concurrency? L3


2.

Outline the three possible levels of concurrency in programs? Explain? L2


3

Write short notes on C# threads? L1


4

Discuss the different states a task can be? Explain? L2


5.

Explain the following with examples? L4

a) Exception handler

b) Disabling an Exception

c) Continuation




6.

Explain detailed compassion of Exception handling capablites of C++ and those of Java? Explain the following with examples? L4


7.

How are Exceptions bound to handlers in C++? L3

Unit – 5

1.

Explain L4

  1. Common Lisp

  2. Haskell

  3. ML




2.

Discuss the applications of functional languages? L2

3.

Explain the difference between Imperative and functional languages? L4


4.

Outline the semantics of COND and LET? L2



Unit Wise Multiple Choice Questions for CRT & Competitive Examinations

Unit-1
1. Which of the following is true about system software.



a. The operating system and all programming support tools of a computer systems are collectively known as its

System Software.

b. The Operating System and the hardware tools of computer systems are called as system software.

c. The Operating System and the Macroinstruction interpreter collectively is known as system software.

d. System software is same as application software

2. Which of the following is the widely used programming language developed for Artificial Intelligence Application

a. ALGOL 60



b. LISP

c. FORTRAN

d. COBOL

3. Which is a scripting language developed by Netscape for use in both Web server and browsers. [01M01]



a. Java Script

b. HTML


c. AWK

d. PHP


4. Which of the following is the language developed to produce business reports.

a. RPG

b. GPSS


c. PHP

d. ALGOL


5. Which was the first language for scientific applications

a. ALGOL 60



b. FORTRA$

c. LISP


d. COBOL

6. Which was the first high-level language developed for business purpose. [01S02]

a. ALGOL 60

b. LISP


c. COBOL

d. FORTRAN

7. CGI stands for [01S03]

a. Common Gateway Interface

b. Computer Gateway Interface

d. Common Gateway interchange

8. The Unix Operating System is written almost entirely in _ _ _ _ __ _ Language

a. LISP

b. C

c. C++


d. Java

9. C was developed by _ _ _ _ _ _ _

a. Pascal

b. D.Ritchie

c. N.Writh d. A. Kay

10. List of Commands put in a file is called [01S06]

a. Script

b. Tag


c. Language d. Program

11. Languages designed around the prevalent computer architecture, called the von Neumann architecture are called as



a. Imperative Languages

b. Functional languages

c. Object - oriented Languages d. Improved Languages.

12. The first high level programming language to include pointer variables was _ _ _ _ _

a. Algol-60

b. Ada


c. PL/1

d. Fortran

13. The ability of a program to intercept run-time errors, take corrective measures and then continue execution is called

a. Error mechanics



b. Exception handling

c. Abstraction

d. Orthogonality

14. The first Language to provide even limited supported for data abstraction is [02M02]

a. Smalltalk

b. SIMULA67

c. Prolog++

15. Which of the following is true for abstraction

a. The ability to define and then use complicated structure in way that allow many of the details to be ignored

b. The process of hiding all low-level details from the user c. The ability to acquire properties of other class.

d. The ability of a program to intercept run-time errors.
Unit – 2

1. A sentence generation is called a _ _ _ _ _ _ _ _ _ _ _ _ _

a. statement b. token

c. BNF


d. derivation

2. Which of the following is a device that can be used to generate the sentences of a language.

a. Sentence generator

b. Language generator

c. Program generator

d. Language recognizers

3. Which is correct about semantics

a. Rules for writing expressions, statements and program units

b. Meaning of the expression, statement and programs units

c. Protocol to be followed by statements

d. Conditions for writing expressions, statements and program units

4. Which of the following of a programming languages can be described by regular grammar



a. Tokens

b. Lexical units c. Lexemes

d. Syntax

5. Which is a language that is used to describe another language.

a. Terminal language

b. Meta language

c. Imperative language

d. Structural language

6. Which of the following is a natural notation for describing syntax

a. Context free grammar

b. Context sensitive grammars



c. Backus - $aur form

d. Regular grammar

7. Which are called the abstractions in a BNF description

a. $on terminals

b. Lexemes c. Tokens

d. Symbols

8. The syntax of a programming language is the form of its expressions, statements and _ _ _ _ _




Download 0.67 Mb.

Share with your friends:
1   2   3   4   5




The database is protected by copyright ©ininet.org 2024
send message

    Main page