Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
21 views
5 pages
(Fall08) Major
IITD paper
Uploaded by
gjluztdg3
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save [Fall08]-Major For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
21 views
5 pages
(Fall08) Major
IITD paper
Uploaded by
gjluztdg3
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save [Fall08]-Major For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save [Fall08]-Major For Later
You are on page 1
/ 5
Search
Fullscreen
Name: Entry: Gp: 1 Indian Tnstitnte of Tecbnology Delhi ‘Department of Computer Science and Engineering csta02 Programming Langusges Major Exam, Apel 20, 2008 15:30-17:90 Maxdinum Marks: 100 ‘Open notes. Write your namé, entry number and group at the tap af each sheet in the blanks provided. Answer all question inthe space provided, in blue o black nk (no pencils, no red pens). Budget your Sime according to ‘ho marks. Use the last page as “overfiow space”. His a set of variable names; with z a typical variable, xy is the inductively defined sex of expressions, with 2! typical expresions. Types is the collection of types with 7 # typical type. TE X mga Types is 3 typical ‘ype assignment, + e: 7 isthe typing relation "e has type r under type assumptions I’ on the variables” and T'F e oh isthe relation that says that command ¢ is fee of type ercore under type assumptions I. Qi (Gx 2mario) Run-time Data Structures, Give short one-santence answers for etch of the following: 1. What ere stars variables in C and where are they allocated? 2 With regard to lifetime and size, wbat Kinds of date structures can safely be sllocated on stack? 3. What is the differenoo betwaen garbage and dangling references? 4. Why Is garbage collection rarely spoken about in languages such as Pascal and whereas itis very important in SML and Jave? 5. Why do we need to allocate values on heap in a higher-order functional language? Is it safe to assume thal any date structure not reachable from the stack is garbage, even if tis on the heap? 6. Why does thu exccution of an infinite chsin of recursive calls in G ar Pascal lead to a “Stack overruns heap” error message? Q® (345 marks) For loops, Consider the definite iteration “lor-loop" command for {= mupton do {c} = where isa fresh integer variable, the seope of which is only the burly of the “For loop"; c is a com- ‘mand thet car look up the value of 1 but cannot change the content of f; and myn ate integer vaues. Tr can be dearribed informally as “execute command ¢ rupeatedly for different values off, taken suc- cessively from that of mr to that of m (both inchusive}.”Name: Entcy: Gp: 2 1. Write the typing rule forthe command for £== m upto w do {c}- TF far =m upto n do Te} oF 2, Write the big:stop evalution rules for this command: Di tertamuponde ta Soe BE (or sm upto a do {cho} =e Q3 (6+242 marks] Principle of Abstraction. The Prinlple of Abstraction does not merely state that Procedures and functions must exist. Rather, it suggests that any construction or 0 given syntartic tategory (eg, commands) can be edapted to a similar causiruction for another syntactic eategnry (eg, expressions), 1, What should the corresponding “definite iteration expresion abstract” ©JL,( # ) compute, if bighesordor function F : Integer —+ 7 + 7 can be considered as sepresenting a family of func: tions f, indexed hy # (Le, 2) =f? 2. What should the expression Quga( #) return ifm
You might also like
Introduction To Agda
PDF
100% (1)
Introduction To Agda
46 pages
Practice Midterm 1
PDF
No ratings yet
Practice Midterm 1
14 pages
12th PYTHON Chapter 1 To 16
PDF
No ratings yet
12th PYTHON Chapter 1 To 16
271 pages
JAC Class 12 2013 Computer Science
PDF
No ratings yet
JAC Class 12 2013 Computer Science
5 pages
Scope in Programming Languages
PDF
No ratings yet
Scope in Programming Languages
14 pages
(Fall07) Major
PDF
No ratings yet
(Fall07) Major
4 pages
10 Final
PDF
No ratings yet
10 Final
10 pages
CSC305 CHAPTER 2b
PDF
No ratings yet
CSC305 CHAPTER 2b
54 pages
Sequential Pascal Report
PDF
No ratings yet
Sequential Pascal Report
47 pages
INFI Exercises FP 20210219
PDF
No ratings yet
INFI Exercises FP 20210219
26 pages
Programming Language
PDF
No ratings yet
Programming Language
20 pages
Cambridge University - Computer Science Tripos - y2023PAPER4
PDF
No ratings yet
Cambridge University - Computer Science Tripos - y2023PAPER4
9 pages
MT 2009 Key
PDF
No ratings yet
MT 2009 Key
5 pages
2005 MT Key
PDF
No ratings yet
2005 MT Key
8 pages
MCQ 3
PDF
No ratings yet
MCQ 3
22 pages
20 2 Final
PDF
No ratings yet
20 2 Final
10 pages
17 2 Final
PDF
No ratings yet
17 2 Final
15 pages
L21 - Nested Procedures
PDF
No ratings yet
L21 - Nested Procedures
4 pages
12th Computer Science Study Material
PDF
No ratings yet
12th Computer Science Study Material
136 pages
2.2.1 Programming Techniques
PDF
No ratings yet
2.2.1 Programming Techniques
42 pages
PLDI Week 10 More Typing
PDF
No ratings yet
PLDI Week 10 More Typing
55 pages
Cse VI Programming Languages 10cs666 Solution PDF
PDF
No ratings yet
Cse VI Programming Languages 10cs666 Solution PDF
17 pages
CS 211 Q&a
PDF
No ratings yet
CS 211 Q&a
9 pages
LISP Lect 4 I O HOF
PDF
No ratings yet
LISP Lect 4 I O HOF
62 pages
Assignment 2
PDF
No ratings yet
Assignment 2
3 pages
12 Type System
PDF
No ratings yet
12 Type System
44 pages
PL Data Types
PDF
No ratings yet
PL Data Types
41 pages
18 1 Final
PDF
No ratings yet
18 1 Final
16 pages
Compiler Design Unit 5 Part 2
PDF
No ratings yet
Compiler Design Unit 5 Part 2
34 pages
CST424 UniveristyPaperJune23SchemeNSolution
PDF
No ratings yet
CST424 UniveristyPaperJune23SchemeNSolution
10 pages
Advanced Compiler Design and Implementation: Introduction To Advanced Topics
PDF
No ratings yet
Advanced Compiler Design and Implementation: Introduction To Advanced Topics
16 pages
14 2 Final
PDF
No ratings yet
14 2 Final
13 pages
6.001 SICP Computability (1) Abstraction: Does Every Expression Stand For A Value?
PDF
No ratings yet
6.001 SICP Computability (1) Abstraction: Does Every Expression Stand For A Value?
6 pages
Cs61a Fa04 mt2 Sol
PDF
No ratings yet
Cs61a Fa04 mt2 Sol
10 pages
Unit 3&4
PDF
No ratings yet
Unit 3&4
34 pages
Compiler Advance Sheet - 2023
PDF
No ratings yet
Compiler Advance Sheet - 2023
33 pages
Concepts 2023
PDF
No ratings yet
Concepts 2023
6 pages
5 Control Abstraction
PDF
No ratings yet
5 Control Abstraction
59 pages
CS-602 PPL Unit-3
PDF
No ratings yet
CS-602 PPL Unit-3
17 pages
STD 12 Cs Chapters 1 To 16
PDF
No ratings yet
STD 12 Cs Chapters 1 To 16
111 pages
Final Exam
PDF
No ratings yet
Final Exam
16 pages
PLC - 1
PDF
No ratings yet
PLC - 1
6 pages
Christiansen - Implementing Dependent Type Checker
PDF
No ratings yet
Christiansen - Implementing Dependent Type Checker
49 pages
Control Flow: Aaron Bloomfield CS 415 Fall 2005
PDF
No ratings yet
Control Flow: Aaron Bloomfield CS 415 Fall 2005
46 pages
12 Cs Full Study Materials 2022-23
PDF
No ratings yet
12 Cs Full Study Materials 2022-23
136 pages
CS441 Midterm-2: Name
PDF
No ratings yet
CS441 Midterm-2: Name
7 pages
Marking Scheme Cs GR 10 11 Mockexam Paper2
PDF
No ratings yet
Marking Scheme Cs GR 10 11 Mockexam Paper2
21 pages
Sub Prog
PDF
No ratings yet
Sub Prog
33 pages
Type T Array (1..10) of Integer S T A: T B: T C: S D: Array (1..10) of Integer
PDF
No ratings yet
Type T Array (1..10) of Integer S T A: T B: T C: S D: Array (1..10) of Integer
3 pages
C++/ Java Interview Questions - Alcatel Lucent: Data Structure
PDF
No ratings yet
C++/ Java Interview Questions - Alcatel Lucent: Data Structure
8 pages
Sample C Gate Paper
PDF
No ratings yet
Sample C Gate Paper
20 pages
Compre 2023 B
PDF
No ratings yet
Compre 2023 B
2 pages
Choose The Most Appropriate Answer
PDF
No ratings yet
Choose The Most Appropriate Answer
6 pages
2024A FE-B Questions
PDF
No ratings yet
2024A FE-B Questions
32 pages
COMP 301 - 2014 - Compart
PDF
No ratings yet
COMP 301 - 2014 - Compart
5 pages
Exercise One Solutions
PDF
No ratings yet
Exercise One Solutions
10 pages
Ugc Net Solved
PDF
No ratings yet
Ugc Net Solved
39 pages
C and C++: HCL
PDF
No ratings yet
C and C++: HCL
84 pages