19.01.2015 Views

CENG 111 EXERCISE SHEET

CENG 111 EXERCISE SHEET

CENG 111 EXERCISE SHEET

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

}<br />

y = x;<br />

x = y;<br />

If the value of control is 5, the following switch statement will<br />

cause a run-time error.<br />

switch (control) {<br />

case 1:<br />

printf("one");<br />

break;<br />

case 2:<br />

printf("two");<br />

break;<br />

case 3:<br />

printf("three");<br />

break;<br />

case 4:<br />

printf("four");<br />

}<br />

13. For what exact range of values of variable x does the following code<br />

segment print the letter 'C'<br />

if (x

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

Saved successfully!

Ooh no, something went wrong!