Question
Note: Attempt any four questions; each question carry equal marks. Question#2 5+ Marks 10 2(a) Consider the program written in a hypothetical programming language
Note: Attempt any four questions; each question carry equal marks. Question#2 5+ Marks 10 2(a) Consider the program written in a hypothetical programming language which allows global variables and a choice of static or dynamic scoping. Let i be variable declared multiple times in different scopes. What will be the i value printed under static scoping and what will be the i value printed under dynamic (scoping. (2) Int i; Program main(){ i = 10; Call f(); } Procedure f() Int i =20; Call g (); Procedure g(){ } Print i; } 2(b) Give the short circuit evaluation of the following program 2 (a). Statice sloping to 120 (5) (3)
Step by Step Solution
3.41 Rating (154 Votes )
There are 3 Steps involved in it
Step: 1
The provided image displays a programming question that asks the impact of static and dynamic scopin...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended Textbook for
Cambridge International AS & A Level Computer Science
Authors: David Watson, Helen Williams
1st Edition
1510457593, 978-1510457591
Students also viewed these Programming questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App