Documente Academic
Documente Profesional
Documente Cultură
TEKNOLOGI
PETRONAS
FINAL EXAMINATION
SEPTEMBER 2012 SEMESTER
COURSE :
DATE
TIME
:
:
INSTRUCTIONS TO CANDIDATES
1.
2.
3.
4.
5.
Note '
There are NINE (9) pages in this Question Booklet including the cover page.
Universiti
Teknologi
PETRONAS
TCBl
b.
01 3
I49T6
and b is
1 4
11
16
71
[10 marks]
TCBl
c
for(int
j:0;
01 3
j < B; t++){
couL
(j J:
if
1)
cout
el_
cout
endl;
[4 marks]
d
for(int
i:
I; i <:5;
cout
i
.i I
1.
Lf
i++)
TCBI
e.
for(int
01 3
"; break;
cout
cout
cout
cout
cout
cout
de
fault : cQut
cout
[4 marks]
TCBl
4
a.
O1
b.
TCBl
5.
a.
01 3
Trace the program shoun in FIGURE Q5a and show the output.
int
{
main
system("pause");
return 0;
FIGURE QSa
[4 marks]
b.
of
pass-by-reference
and
pass-by-value
parameters in function.
[4 marks]
c.
d.
lsr,
FIGURE Q5d
TCBI
01 3
i.
list-)info,.
ii.
X->link->i_nfo,[1 mark]
lt.
Y->inf o;
tv.
list->link->l-ink->info;
[1 mark]
e.
i.
ii.
- END OF PAPER
10
inf
o 38.
to do the