August 1997
CA208: 'C' PROGRAMMING

QUESTION 2

Total Marks: 20 Marks

Click here to access other questions

Click to access
SUGGESTED SOLUTIONS
for Question 2

2. (a) What is the effect of adding the keyword static to a local variable in a procedure? [2]
(b) Given the following program:

(i) What is the output of the program when it is executed? [4]
(ii) What would the output be if the static keyboard were removed? [4]
(c) Trace the output produced when the following C programs are executed:
(i) Program 1: [4]

(ii) Program 2: [6]