Principles of Programming Languages Mid - I, February - 2012

1.Use of recursion
  • Enhances logical clarity
  • Makes debugging easier
  • Reduces execution time
  • None of the above
Answer: A
2.Which of the following class of statements usually produce no object code when compiled?
  • Assignment
  • Declaration
  • Unreachable
  • Control
Answer: D
3.BNF is a meta-language for
  • Specifying the syntax of a language
  • Specifying a context free grammar
  • Describing how a program works
  • Shell programming
Answer: B
4.Vernacular languages (like English) and programming languages have a lot of similarities. In a broad sense ,the nouns and verbs are comparable to
  • Operators and identifiers respectively
  • Operands and identifiers respectively
  • Operands and operators respectively
  • Operators and functions respectively
Answer: C
5.Binding cannot be done
  • When separately compiled modules are linked together
  • During loading
  • While writing a program
  • None of the above
Answer: D
6.The principal that a function can always be replaced by its value (irrespective of the context) without changing thmeaning is called.
  • Referential transparency
  • Orthogonality
  • Context free
  • Unbinding
Answer: A
7.The ________________ of a language is category of its lexemes.
  • String
  • Statements
  • Token
  • None of the above
Answer: C
8.The until keyword is used in the for loop of ______________ language.
  • C
  • COBOL
  • ALGOL 60
  • ADA
Answer: C
9.A ___________________ provides the means of choosing between two or more execution paths in a program.
  • Block
  • Program
  • Selection statement
  • Sequential statement
Answer: C
10.The first high –level language to include support for pointer variables was.
  • Java
  • C++
  • PL/I
  • Ada
Answer: C
11.A _________________ refers to a collection of tools used in the development of software programs.
Answer: Programming environment
12.PROLOG is an example of _______________________ programming language paradigm.
Answer: Logic
13.___________________ attributes are used to pass semantic information up a parse tree.
Answer: Synthesized
14.______________________ holds the address of a deallocated heap dynamic variable.
Answer: Dangling pointer
15.In C switch case statement the default expression type can be _________________.
Answer: int
16.A ____________ is a logical statement that is assumed to be true.
Answer: Axiom
17.Type compatibility is described in ________________ semantics.
Answer: Static
18.A __________________ cannot be used as a name.
Answer: Reserved word
19.An identifier can be interchanged with ___________________.
Answer: Name
20.A _____________ is a compound statement that can define a new scope with local variables.
Answer: Block