Theory Of Programming Language BSCS 6th Term 2017 UOS
University of Sargodha
BS 6th Term Examination 2017
Subject: Computer Science
Paper: Theory of Programming Languages (CS: 4140)
Time Allowed: 2:30 Hours
Maximum Marks: 80
Objective Part (Compulsory)
Q.1. Write short answers of the following in 2-3 lines each on your answer sheet. (2*16)
i. Differentiate between Compiler and Interpreter.
ii. What are uses of Regular Expressions?
iii. Differentiate between static and dynamic.
iv. What is Heap based allocation?
v. What is a dangling reference?
vi. What is compiler’s symbol table?
vii. What is subroutine closure?
viii. What distinguishes operators from other sorts of functions?
ix. What is the difference between a semantic function and an action routine?
x. What are aggregates?
xi. Write the distinction between exceptions and multilevel returns.
xii. What is a container (a collection)?
xiii. What is a tail-recursive function?
xiv. What is the difference between discrete and scalar types?
xv. Explain the differences among strict and loose name equivalence.
xvi. Differentiate between arrays and vectors.
Subjective part (3*16)
Q.2. Write a note on modules, explain Modules as Abstractions and Modules as Managers.
Q.3. What are different classes of binding time? Explain any two.
Q.4. What is inheritance? Differentiate between abstract class and derived classes.
Q.5. Write any four types of programming languages. Write a note on Logic programming language with help of prolog.
Q.6. What are Events, write a note on types of event handlers.