Semester : SEMESTER 7
Subject : Programming Paradigms
Year : 2021
Term : DECEMBER
Branch : COMPUTER SCIENCE AND ENGINEERING
Scheme : 2015 Full Time
Course Code : CS 403
Page:2
13
14
15
16
17
18
19
b)
a)
b)
a)
b)
a)
b)
a)
b)
a)
b)
a)
b)
a)
10000CS403122101
Explain explicit parametric polymorphism and _ implicit parametric
polymorphism.
What is Short-circuit expression evaluation? Point out the situations where short
circuiting can be implemented.
Explain how pointer reversal techniques are used for garbage collection.
PART C
Answer any two full questions, each carries 9 marks.
Explain default or optional parameters.
Explain the different types of parameter passing methods with examples.
From the below facts and rules, explain the backtracking strategy in Prolog.
rainy(seattle).
rainy(rochester).
cold(rochester).
snowy(X) :- rainy(X), cold(X).
Define Lambda calculus. Given the following function and expression explain
applicative-order evaluation and normal order evaluation.
(define switch (lambda (x a b c)
(cond ((< + 0) 2)
((= x 0) 0)
((> x 0) ०))))
(switch -1 (+ 1 2) (+ 2 3) (+3 4))
Compare Co-routine and subroutine with examples.
Explain Delay and force constructs that allows to use lazy evaluation in scheme.
PART D
Answer any two full questions, each carries 12 marks.
Explain any six object orientated concepts.
Explain with an example the use of ‘this’ parameter.
Explain Busy-Wait synchronization.
Explain how synchronization can be achieved in concurrent programming.
Which of the following patterns will exactly match the string “Paradigms”
7 / ara..[a-z]+/
Page 2 of 3
(4)
(6)
(3)
(3)
(6)
(4)
(5)
(6)
(3)
(6)
(6)
(6)
(6)
(6)