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.

SECTION A: MULTIPLE-CHOICE (20 QUESTIONS, 30 MARKS)<br />

Instruction: Please select the BEST answer from the given choices.<br />

1. What the following program would display<br />

(The symbol '#' stands for one blank character.)<br />

int main(void)<br />

{<br />

double a, b;<br />

a = 11.56;<br />

b = 101.117;<br />

printf("Is it%6.1f%9.4f", a, b);<br />

printf("\n");<br />

return (0);<br />

}<br />

(a)<br />

(b)<br />

(c)<br />

(d)<br />

Is#it##11.6#101.1170\n<br />

Is#it##11.6#101.1170<br />

Is#it##11.5#101.1170<br />

Is#it##11.6#101.117\n<br />

2. Every statement in C must end with a<br />

(a) period (.)<br />

(b) backslash (/)<br />

(c) colon (:)<br />

(d) semicolon (;)<br />

3. Which of the following is not a VALID escape sequence<br />

(a) \~<br />

(b) \\<br />

(c) \n<br />

(d) \”<br />

4. Which of the following is an INVALID identifier (variable name)<br />

(a) _<strong>Mar</strong>ks<br />

(b) MaRK<br />

(c) 5MARKS<br />

(d) MARKS5<br />

Semester 2 2006/2007<br />

Page 2 of 11<br />

Principles of Programming

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

Saved successfully!

Ooh no, something went wrong!