15.01.2015 Views

CCSB163 Final - Mar 2007.pdf - MetaLab - Universiti Tenaga Nasional

CCSB163 Final - Mar 2007.pdf - MetaLab - Universiti Tenaga Nasional

CCSB163 Final - Mar 2007.pdf - MetaLab - Universiti Tenaga Nasional

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

5. Using the following function definition, the parameter list is represented by<br />

X Y( Z ) {<br />

D<br />

}<br />

(a)<br />

(b)<br />

(c)<br />

(d)<br />

X<br />

Y<br />

Z<br />

D<br />

6. Which of the types listed below can be the type of the result value returned by<br />

a user-defined function<br />

(a) int<br />

(b) double<br />

(c) char<br />

(d) all of the above<br />

7. What will be the value of variable i after the C statements below have been<br />

executed<br />

i = 2;<br />

j = 10;<br />

if ((3 * i) < j)<br />

i = i + 2;<br />

i = i + 3;<br />

(a) 5<br />

(b) 6<br />

(c) 7<br />

(d) 10<br />

Semester 2 2006/2007<br />

Page 3 of 11<br />

Principles of Programming

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!