a. program units
b. steps
c. functions
d. algorithms
9. For the instruction a = b/2 - 1 { a < 10 } is called as
a. Pre condition
b. Post condition
c. Weakest condition d. strong condition
10. For the instruction x = 2 * y - 3, {y < 0 } is called as
a. Pre condition
b. Post condition
c. Weakest condition d. strong condition
Unit-3
1. _ _ _ _ _ _ _ data type stores the data in BDC notation
a. float
b. double c. int
d. decimal
2. _ _ _ _ _ _ _ _ is one in which the range of possible values can be easily associated with the set of positive integers
a. variable b. data
c. ordinal type
d. constant
3. _ _ _ _ _ _ data type model real numbers, but only as approximations
a. float
b. char c. int
d. string
4. _ _ _ _ _ _ _ data type specifically available in a Language for business applications.
a. float
b. double c. int
d. decimal
5. The variables receive values at _ _ _ _ _ _ _ _ _ _ _ _ _ _
a. compile time
b. run time
c. language design time d. load time
6. The attributes of variables are determined at _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
a. compile time
b. run time
c. language design time d. load time
7. A _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ is a set of objects & a set of operations on those objects, which create, build-up, destroy, modify & pick apart instance of the objects
a. Data type
b. Data valued c. State space d. Environment
8. _ _ _ _ _ _ _ is not primitive data type,
a. float b. char c. int
d. string
9. _ _ _ _ _ _ _ _ _ data type store true or false notation
a. float
b. boolean
c. int
d. char
10. _ _ _ _ _ _ _ type stores values as sequences of characters
a. float
b. boolean c. int
d. string types
Unit- 4
1.Multiple selector statement in C is _ _ _ _ _
a. break
b. switch
c. go to
d. continue
2. _ _ _ _ _ _ _ is a two way selector
a. if
b. if else
c. for
d. while
3. In C Switch-Case statement the default expression type can be _ _ _ _ _ _ _ _ _
a. int
b. float
c. double d. char
4. The following is a Exit controlled loop
a. While
b. do-while
c. for
d. go to
5. In Pascal, after normal termination, loop variable is _ _ _ _ _ _ _ _ _ _
a. Undefined
b. assigned last value c. zero
d. one
6. _ _ _ _ _ _ _ _ _ _ language supports labeled iteration
a. C
b. C++
c. Java
d. Pascal
7. In FORTRAN 90, Loop parameters are evaluated _ _ _ _ _ _
a. only once
b. twice c. thrice
d. every time
8. In Ada 60, Loop parameters are evaluated _ _ _ _ _ _
a. only once b. Twice
c. Thrice
d. Everytime
9. The repeated execution of a statement or compound statement is accomplished by _ _ _ _ _
a. Iteration
b. Selection c. Condition d. Blocking
10. In Pascal, Loop parameters are evaluated _ _ _ _ _ _
a. Only once
b. Twice c. Thrice
d. Every time
University Question Papers
II B.TECH - II SEMESTER EXAMINATIONS, APRIL/MAY, 2011
PRINCIPLES OF PROGRAMMING LANGUAGES
(INFORMATION TECHNOLOGY)
Time: 3hours Max. Marks: 75
Answer any FIVE questions
All Questions Carry Equal Marks
- - -
1. How can knowledge of programming language characteristics benefits the whole computing Community? [15]
2.a) The two mathematical models of language description are generation and recognition. Describe how each can define the syntax of a programming language?
b) Develop an unambiguous grammar that describes the if statement. [8+7]
3.a) Explain all of the difference between subtypes and derived types.
b) Define union, free union and discriminated union? [8+7]
4.a) How does operand evaluation order interact with functional side effect ?
b) How does operand evaluation order interact with function side effects? [8+7]
5.a) Define Shallow and Deep binding for referencing environment of subprograms that Have been passed as parameters.
b) Write about Co routines. [8+7]
6.a) In what different places can the definition of a C++ member function appears?
b) What is a C++ namespace and what is its purpose? [8+7]
7. Explain the following with examples
a) Exception Handler
b) Disabling an exception
c) Continuation
d) Built-in Exception. [15]
8.a) What are the difference between CONS, LIST and APPENED?
b) Write a LISP function Fib(n) that computes nth Fibonacci number. [7+8]
********
II B.TECH - II SEMESTER EXAMINATIONS, APRIL/MAY, 2011
PRINCIPLES OF PROGRAMMING LANGUAGES
(INFORMATION TECHNOLOGY)
Time: 3hours Max. Marks: 75
Answer any FIVE questions
All Questions Carry Equal Marks
- - -
1. What are some features of specific programming languages you know whose rationales are a mystery to you? [15]
2. Write a BNF description of the Boolean expressions of Java, including the three operators &&, || and ! and the relational expressions? [15]
3.a) What are the design issues for character string types?
b) What array initialization feature is available in Ada that is not available in other common imperative languages? [7+8]
4. Write text program in c++, java and c# to determine the scope of a variable declared in a for statement. Specifically the code must determine whether such variable is visible after the body of the for statement. [15]
5.a) What are the different models of parameter passing methods? How are they implemented? Give example for each.
b) What causes a C++ template function to be instantiated? [8+7]
6. Write an analysis of the similarities of and differences between java packages and C++ namespaces? [15]
7. What run-time errors or conditions, if any, an Pascal programs detect and handle? [15]
8. What scoping rule is used in
a) COMMON LISP
b) ML
c) Haskell. [15]
* * * * * *
II B.TECH - II SEMESTER EXAMINATIONS, APRIL/MAY, 2011
PRINCIPLES OF PROGRAMMING LANGUAGES
(INFORMATION TECHNOLOGY)
Time: 3hours Max. Marks: 75
Answer any FIVE questions
All Questions Carry Equal Marks
- - -
1. Many languages distinguish between UPPER CASE and LOWER CASE letters in user-defined names. What are the pros and cons of this design decision? [15]
2.a) Describe the basic concept of denotational semantics?
b) What is the difference between synthesized and inherited attributes? [7+8]
3. What are all of the differences between the enumeration types of C++ and those of java? How does a decimal value waste memory space? [15]
4. Determine whether the narrowing explicit type conversions in two languages you know provide errors messages when a converted value loses its usefulness? [15]
5. 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? [15]
6.a) What are the language design issues for abstract data types?
b) What are the disadvantages of designing an abstract data type to be a pointer? [7+8]
7. Write detailed compassion of the Exception Handling capabilities of C++ and those of JAVA? [15]
8. Define functional form and referential transparency? What data types were parts of the original LISP? [15]
********
II B.TECH - II SEMESTER EXAMINATIONS, APRIL/MAY, 2011
PRINCIPLES OF PROGRAMMING LANGUAGES
(INFORMATION TECHNOLOGY)
Time: 3hours Max. Marks: 75
Answer any FIVE questions
All Questions Carry Equal Marks
- - -
1. Which produces faster Program execution, a Compiler (or) pure interpreter? What role does the symbol table play in a compiler? [15]
2.a) Describe the approach of using axiomatic semantics to convert the correctness of a given program?
b) Convert the following EBNF to BNF
S->A{bA}
A-> a[b]A [7+8]
3. What is the purpose of the ACTION, GOTO table of an LR parser? Explain With Example? [15]
4. Write text program in c++, java and c# to determine the scope of a variable declared in a for statement. Specifically the code must determine whether such variable is visible after the body of the for statement. [15]
5. Define static, fixed stack-dynamic, fixed heap-dynamic and heap-dynamic array. What are the advantages of each? [15]
6.a) What is the primary problem with using semaphores to provide synchronization?
b) Explain the difference between physical and logical concurrency? [8+7]
7. What is root class of all java exception classes? What is pattern class of most java user defined exception classes? [15]
8.a) Write a detail note on functions in ML.
b) Give comparison of Functional and Imperative Languages. [7+8]
II B.TECH - II SEMESTER EXAMINATIONS, APRIL/MAY, 2011
PRINCIPLES OF PROGRAMMING LANGUAGES
(INFORMATION TECHNOLOGY)
Time: 3hours Max. Marks: 75
Answer any FIVE questions
All Questions Carry Equal Marks
- - -
1. How can knowledge of programming language characteristics benefits the whole computing Community? [15]
2.a) The two mathematical models of language description are generation and recognition. Describe how each can define the syntax of a programming language?
b) Develop an unambiguous grammar that describes the if statement. [8+7]
3.a) Explain all of the difference between subtypes and derived types.
b) Define union, free union and discriminated union? [8+7]
4.a) How does operand evaluation order interact with functional side effect ?
b) How does operand evaluation order interact with function side effects? [8+7]
5.a) Define Shallow and Deep binding for referencing environment of subprograms that Have been passed as parameters.
b) Write about Co routines. [8+7]
6.a) In what different places can the definition of a C++ member function appears?
b) What is a C++ namespace and what is its purpose? [8+7]
7. Explain the following with examples
a) Exception Handler
b) Disabling an exception
c) Continuation
d) Built-in Exception. [15]
8.a) What are the difference between CONS, LIST and APPENED?
b) Write a LISP function Fib(n) that computes nth Fibonacci number. [7+8]
********
II B.TECH - II SEMESTER EXAMINATIONS, APRIL/MAY, 2011
PRINCIPLES OF PROGRAMMING LANGUAGES
(INFORMATION TECHNOLOGY)
Time: 3hours Max. Marks: 75
Answer any FIVE questions
All Questions Carry Equal Marks
- - -
1. What are some features of specific programming languages you know whose rationales are a mystery to you? [15]
2. Write a BNF description of the Boolean expressions of Java, including the three operators &&, || and ! and the relational expressions? [15]
3.a) What are the design issues for character string types?
b) What array initialization feature is available in Ada that is not available in other common imperative languages? [7+8]
4. Write text program in c++, java and c# to determine the scope of a variable declared in a for statement. Specifically the code must determine whether such variable is visible after the body of the for statement. [15]
5.a) What are the different models of parameter passing methods? How are they implemented? Give example for each.
b) What causes a C++ template function to be instantiated? [8+7]
6. Write an analysis of the similarities of and differences between java packages and C++ namespaces? [15]
7. What run-time errors or conditions, if any, an Pascal programs detect and handle? [15]
8. What scoping rule is used in
a) COMMON LISP
b) ML
c) Haskell. [15]
* * * * * *
II B.TECH - II SEMESTER EXAMINATIONS, APRIL/MAY, 2011
PRINCIPLES OF PROGRAMMING LANGUAGES
(INFORMATION TECHNOLOGY)
Time: 3hours Max. Marks: 75
Answer any FIVE questions
All Questions Carry Equal Marks
- - -
1. Many languages distinguish between UPPER CASE and LOWER CASE letters in user-defined names. What are the pros and cons of this design decision? [15]
2.a) Describe the basic concept of denotational semantics?
b) What is the difference between synthesized and inherited attributes? [7+8]
3. What are all of the differences between the enumeration types of C++ and those of java? How does a decimal value waste memory space? [15]
4. Determine whether the narrowing explicit type conversions in two languages you know provide errors messages when a converted value loses its usefulness? [15]
5. 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? [15]
6.a) What are the language design issues for abstract data types?
b) What are the disadvantages of designing an abstract data type to be a pointer? [7+8]
7. Write detailed compassion of the Exception Handling capabilities of C++ and those of JAVA? [15]
8. Define functional form and referential transparency? What data types were parts of the original LISP? [15]
********
II B.TECH - II SEMESTER EXAMINATIONS, APRIL/MAY, 2011
PRINCIPLES OF PROGRAMMING LANGUAGES
(INFORMATION TECHNOLOGY)
Time: 3hours Max. Marks: 75
Answer any FIVE questions
All Questions Carry Equal Marks
- - -
1. Which produces faster Program execution, a Compiler (or) pure interpreter? What role does the symbol table play in a compiler? [15]
2.a) Describe the approach of using axiomatic semantics to convert the correctness of a given program?
b) Convert the following EBNF to BNF
S->A{bA}
A-> a[b]A [7+8]
3. What is the purpose of the ACTION, GOTO table of an LR parser? Explain With Example? [15]
4. Write text program in c++, java and c# to determine the scope of a variable declared in a for statement. Specifically the code must determine whether such variable is visible after the body of the for statement. [15]
5. Define static, fixed stack-dynamic, fixed heap-dynamic and heap-dynamic array. What are the advantages of each? [15]
6.a) What is the primary problem with using semaphores to provide synchronization?
b) Explain the difference between physical and logical concurrency? [8+7]
7. What is root class of all java exception classes? What is pattern class of most java user defined exception classes? [15]
8.a) Write a detail note on functions in ML.
b) Give comparison of Functional and Imperative Languages. [7+8]
B.Tech II Year - II Semester Examinations, December-January, 2011-2012
PRINCIPLES OF PROGRAMMING LANGUAGES
(INFORMATION TECHNOLOGY)
Time: 3 hours Max. Marks: 75
Answer any five questions
All questions carry equal marks
---
1.a) What are the advantages and disadvantages of Aliasing.
b) “Readability and writability influence the reliability.” Comment on it. [15]
2.a) Explain the general problem of describing syntax.
b) Consider the grammar E E+E
E E*E
E i
Using the expression 5+6*7, prove that the grammar is ambiguous. [15]
3.a) Discuss the design issues for pointer types.
b) Define the terms: coercion, type error, strong typing. [15]
4.a) Explain about mixed mode assignment.
b) “Every counting loop can be built with a logical loop, but the reverse is not true.” Substantiate this statement. [15]
5. What is meant by generic sub program? Explain the support provided by programming languages for generic subprograms. [15]
6.a) What advantages do monitors have over semaphores? Explain.
b) Explain why naming encapsulations are important for developing large programs.
[15]
7. Explain list processing in LISP using scheme functions. Use lucid examples in your explanation. [15]
8. What is exception? Discuss in detail the concept of exception propagation. [15]
********
B.Tech II Year - II Semester Examinations, December-January, 2011-2012
PRINCIPLES OF PROGRAMMING LANGUAGES
(INFORMATION TECHNOLOGY)
Time: 3 hours Max. Marks: 75
Answer any five questions
All questions carry equal marks
- - -
1. Discuss language evaluation criteria and the characteristics that affect them. [15]
2.a) In what way do operational semantics and denotational semantics differ? Explain.
b) Describe the additional features of Extended BNF. [15]
3.a) Discuss the advantages and disadvantages of dynamic scoping.
b) What is a heterogeneous array? Discuss the design issues for arrays. [15]
4. Explain in detail the design issues for arithmetic expressions. [15]
5.a) Describe the three semantic models of parameter passing.
b) What is a parameter profile? Write about subprogram protocol. [15]
6.a) Compare the class entity access controls of C++ and Java.
b) Define race condition
c) What is the purpose of a task-ready queue? [15]
7.a) Explain the procedural abstraction in Python.
b) Discuss the fundamental of functional programming language. [15]
8. Give an overview of logic programming and discuss its applications. [15]
********
B.Tech II Year - II Semester Examinations, December-January, 2011-2012
PRINCIPLES OF PROGRAMMING LANGUAGES
(INFORMATION TECHNOLOGY)
Time: 3 hours Max. Marks: 75
Answer any five questions
All questions carry equal marks
- - -
1. Explain various programming domains. What are your arguments for and against having a single language for all programming domains? [15]
2.a) Discuss the basic concept of Denotational semantics.
b) Show a parse tree and leftmost derivation for the statement: A=(A+B)*C
Given grammar is: =
A/B/C
+ /
* /
() / [15]
3.a) Compare and contrast Static binding with Dynamic binding.
b) Explain various user-defined ordinal types with examples. [15]
4.a) Discuss the problem of operand evaluation order and side effects along with possible solutions.
b) Describe user-located loop control mechanisms. [15]
5.a) Explain the general characteristics of subprograms.
b) What is a co-routine? How do they provide interleaved execution? [15]
6.a) What are the language design requirements for a languages that supports ADTs?
b) How is cooperation synchronization provided for Ada tasks? Explain. [15]
7. Discuss how scheme functions are used to solve the problems in simple list-processing with examples. [15]
8. Explain the basic elements of Prolog with illustrations. [15]
*********
B.Tech II Year - II Semester Examinations, December-January, 2011-2012
PRINCIPLES OF PROGRAMMING LANGUAGES
(INFORMATION TECHNOLOGY)
Time: 3 hours Max. Marks: 75
Answer any five questions
All questions carry equal marks
- - -
1.a) List the potential benefits of studying concepts of programming language.
b) What are the important factors that influence the basic design of programming language? [15]
2. Describe briefly formal language generation mechanisms used to describe the syntax of programming languages. [15]
4.a) Define name type compatibility and structure type compatibility. What are the relative merits of these two?
b) Explain in detail implementation of pointer and reference types. [15]
4.a) Describe coercion in expressions.
b) Explain in detail Dijkstra’s guarded commands with examples. [15]
5. Explain variety of models that guide the implementation of the three basic parameter transmission modes. [15]
6.a) What dangers are avoided in Java by having implicit garbage collection, relative to C++?
b) Discuss the primary reason for all Java objects have a common ancestor.
c) What is a binary semaphore? Compare it with counting semaphore. [15]
7.a) Explain type inferencing in ML.
b) Discuss the key concepts of scripting language. [15]
8. Discuss various types of exceptions. Explain exception handler in Ada with suitable examples. [15]
B.Tech III-I Semester Examinations, December – 2011
PRINCIPLES OF PROGRAMMING LANGUAGES
(COMPUTER SCIENCE AND ENGINEERING)
Time: 3 hours Max. Marks: 80
Answer any five questions
All questions carry equal marks
---
1. A programming language can be compiled or interpreted. Give relative advantages and disadvantages of compilation and interpretation. Give examples of compiled and interpreted languages. [16]
2. How do you describe the meaning of program using operational semantics? Explain with suitable examples and compare it with denotational semantics. [16]
3.a) Describe narrowing and widening conversion.
b) Explain the concept of late binding and early binding. [8+8]
4. Discuss different types of assignment statements. With lucid examples explain mixed mode assignment. [16]
5.a) Discuss the design issues of sub programs.
b) Write about overloaded subprograms.
c) What are coroutines? [16]
6.a) Discuss the Object oriented programming features supported in small talk.
b) What is meant by subprogram level concurrency? Explain. [8+8]
7. What is an exception? Explain exception propagation and handling in C++. [16]
8.a) Write about functions in ML and Haskell.
b) Discuss the data types supported in Python. [8+8]
Share with your friends: |