0% found this document useful (0 votes)
4 views1 page

Programming Languages Tutorial 8

Uploaded by

Kishore My
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Programming Languages Tutorial 8

Uploaded by

Kishore My
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

DEPARTMENT OF INFORMATION TECHNOLOGY

KAKATIYA INSTITUTE OF TECHNOLOGY & SCIENCE, WARANGAL


(An Autonomous Institute under Kakatiya University, Warangal)

TUTORIAL-8
Course Code : U18IT502A
Course Name : PRINCIPLES OF PROGRAMMING LANGUAGES
Branch : IT
Semester : 5
Section : 5IT 1 & 2
Tutorial Sheet posted on : 19.09.2025
Week No. of Tutorial Class : 10
Tutorial Class Scheduled on : B1&B2 7.10.2025
CDT 23: Side effects and aliasing
CDT24: Exceptions and Handling Exceptions
Topics Covered
: CDT25: Pattern matching, Non determinism and Backtracking,
(As per OBLS - Week-6) Event driven computations
CDT26: Concurrent Computations

Batch P. Tutorial Problems CO CDLL


No. No.
1. a) What are the types of side effects in a programming language. (R) –[1] CO3 [Ap]
b) Illustrate with an example how two variable names can refer to the same
memory location (aliasing). (U)-[1]
c) Develop a C- program where two pointers p and q alias the same integer.
(Ap)-[2]
2. a) Define exception with an example. (R) –[1] CO3 [Ap]

Batch-1 b) Explain the concept of “throwing” and “catching” exceptions with an


example. (U)-[1]
c) Construct a program that uses try and catch blocks to handle
exception. (Ap)-[2]
3. a) What is pattern matching in ML? (R)-[1] CO3 [Ap]
b) Explain the role of pattern matching in recursive functions (like list
processing). (U)-[1]
c) Construct ML code using pattern matching that defines a function
day_off to check whether a given day is a holiday or not. (Ap)-[2]
4. a) What is non-determinism in programming languages? (R)–[1] CO3 [Ap]
b) Illustrate non-determinism with an example where multiple possibilities
exist. (U)-[1]
c) Identify how failure and retry points are managed in backtracking
algorithms. (Ap)-[2]
5. a) List the keywords used for exception handling in Ada and Eiffel. (R)–[1] CO3 [Ap]
Batch-2 b) Compare the flow of control when an exception occurs in Ada vs. Eiffel.
(U)-[1]
c) Construct the programs to handle exceptions in Ada & Effiel languages.
(Ap)-[2]
6. a) What is concurrent computation? (R)–[1] CO3 [Ap]
b) Explain the difference between physical parallelism and logical
parallelism. (U)-[1]
c) Apply coroutines to simulate cooperative multitasking. (Ap)-[2]
**** Prepared by:
[Link] & [Link] Kumar,
Dept. of IT,

You might also like