2 COl LI language design? What is 'type error'? How it can be resolved In language 2. 2 001 L2 design? Comment on copy vs reference semantics of assignment 3. 2 001 L1 statements.
Other Or UnclassifiedSource quality review required
Anna University
| University | Anna University |
|---|---|
| Degree | B.E. Computer Science and Engineering |
| Department | Computer Science and Engineering |
| Regulation | Regulation 2018 |
| Semester | 5 |
| Subject Code | CS6302 |
| Subject Name | PROGRAMMING PARADIGMS |
| Exam Session | November / December 2024 |
| Duration | 3 Hours |
| Maximum Marks | 100 |
Access the previous year question paper for your examination preparation.
View / Download PDFBrowse other previous year question papers for this subject.
View All Subject Question PapersAutomatically extracted historical question data. Academic accuracy and examination rules require verification.
| Part | Required answers | Marks per answer | Section total |
|---|---|---|---|
| A | 10 | 2 | 20 |
| B | 8 | 8 | 64 |
| C | 2 | 8 | 16 |
Proportional to section marks. This estimate uses the full exam duration without a separate reading or revision reserve.
2 COl LI language design? What is 'type error'? How it can be resolved In language 2. 2 001 L2 design? Comment on copy vs reference semantics of assignment 3. 2 001 L1 statements.
Other Or UnclassifiedSource quality review required
Give an' example of an expression in G, with side effects. 2 C02 L2
Other Or UnclassifiedSource quality review required
What is a 'partial function'? Give example. . 2 C02 L2 Illustrate the concept of implementation of dynamic arrays, 6. 2 C02 L1 using runtime stack and heap. Mention the potential problem that occurs in the call fo scanf 7. 2 002 L2 . function in.C. . •. . Why the semantics definition becomes complicated for 8. 2 001 L2 multiple inheritance? 9. What are 'eager' and 'lazy' evaluation mechanisms? 2 004 L1 Give expansions for the following: ALGOL, FORTRAN, LISP, 10. 2 002 LI PHP.
DefinitionSource quality review required
programs using compilation and interpretation techniques? 8 001 L2 Explain with examples. What are the design issues for exception handling? Discuss
Other Or UnclassifiedSource quality review required
how exceptions are handled in any popular language of your 8 002 L I choice. i) Present the necessary formalism for checking the validity of 4
Other Or UnclassifiedSource quality review required
a typical 'function' in C-lite. 002 L2 4 ..ii)Consider the following.C-iike program:. . . .„ ********************************************************************************************************** ^ ^ ^ ^ intint a;a; procedureprocedure foo(intfoo(int x){x){ xx == x+10;x+10; aa == aa ++ x;}x;} procedureprocedure fie(){fie(){ aaa ==— '^•'^•o, foo{a); print (a);} Wtiat is tine output of the above program for each of the following parameter passing mechanisms? a) Argument a is passed by value b) Argument a is passed by Reference c) Argunient a is passed by Value-Result . Present the structure of an 'Activation Record'. Demonstrate
Other Or UnclassifiedSource quality review required
the semantics of function call and return using run-time stack, 8 001 LI for any simple recursive function of your choice. Show all steps in the derivation of the meaning of the following assignment statement when executed in the given state, using 15. 8 001 L2 •the denotational sematic rule. M(x=2*x+3/v-4,(<x,6>,<y,-12>,<Z,75>}) Describe the General features of 'Imperative programming 16. 8 002 LI paradigm'. Present the detailed steps of any popular 'Garbage Collection'
Other Or UnclassifiedSource quality review required
algorithm of your choice and critically analyze its pros and 8 002 LI cons. i) Mentionthe common characteristics of'scripting languages'. ii) Present the distinctive features of any popular scripting 4
Other Or UnclassifiedSource quality review required
language of your choice and contrast those features in temis 003, L2 4 of 'numeric,types', 'arrays', 'scoping' with that of any popular compiled language. Discuss about the significance of 'abstract' class in object-
Other Or UnclassifiedSource quality review required
oriented programming, and how does it differ from an 8 002 LI 'interface'. What are the unique features of 'functional programming'? Demonstrate using ahy functional"programming laih&uage of 20. 8 . 004 L2 , your choice the list data structure usage, by defining a function that accepts an unordered list and returns some ordered list. Write short notes on two popular strategies for supporting
Other Or UnclassifiedSource quality review required
8 003 L2 'synchronization' and cqmpare their pros' and cons. What are the differentiating features of 'Event Driven programming' in comparison with 'imperative paradigm'?
Other Or UnclassifiedSource quality review required
Present a detailed discussion on how Event handling is 8 004 L1 implemented in any popular language of your choice choosing any simple example of your choice.
Other Or UnclassifiedSource quality review required
provide illustrations wherever necessary: 8 004 L3 cousin (Wfio, Jeff). mother(mary, sue). mother(mary, bill). mother(sue, nancy). mother(sue, jeff). motherGane, ron). fatherGohn, sue). fatherOohn, bill). father(bob, nancy). father(bob, jeff). father(bill, ron). • parent{A,B) :-father(A,B). parent(A,B) :- mother(A,B). grandparent(C,D):- parent(C,E), parent(E,D). sibling(U,V):- parent(P,U), parent(P,V); U\=V.. ' cousin(X,Y):- parent(U,X), parent(V,Y), sibling(U,V), X\=Y. *************************************************** Consider the following G-like program. What does the program print if the language uses static and dynamic scoping? Draw symbol table and explain, *********************************************************** Program A^) { x, y, z: integer; procedure B() { y: integer; .y=0; . x=z+1; z=y+2; } procedure C() { z:. integer;24. 8 001 L3 procedure D() { x: integer; x = z+ 1; y = x+ 1; call B(); .. ,} . z = 5; • callDO; } x= 10; y = i i ; z= 12; caiiCO; print X, y, z;} ************************************************************************ 3
Other Or UnclassifiedSource quality review required
Historical analysis based on extracted question papers. Topic classifications, marks and planning estimates are provisional.