1.Which is the correct statement?
a) Printf(�Maximum = %d\n�, (x.y) ? x : y);
b) Printf( �%s\n�, (mark >= 60) ? �First class� : �Not first class� );
c) Printf(�%s\n�, PASS);
d) All of the above
ANSWER: D
2.Do-While loop terminates when conditional expression returns?
a) Zero
b) One
c) Non-zero
d) -1
ANSWER: A
3.In the following loop construct, which one is executed only once always.
for ( exp1; exp2; exp3) {. . . }
a) exp1
b) exp3
c) exp1 and exp3
d) exp1, exp2 and exp3
ANSWER: A
4. if default statement is omitted and there is no match with the case table
a) No statement within switch case will be executed
b) Syntax error is produced
c) Executes all the statements in the switch case construct
d) Executes the last case statement only
ANSWER: A
5.What will be printed when the above code is executed?
main()
{
int a = 2, b = 4, c = 8, x = 4;
if ( x == b) x = a; else x = b;
if( x != b) c = c + b; else c = c + a;
printf(�c = %d\n�,c);
}
a) C = 4
b) C = 8
c) C = 10
d) C = 12
ANSWER: D
CONTINUE READING �
a) Printf(�Maximum = %d\n�, (x.y) ? x : y);
b) Printf( �%s\n�, (mark >= 60) ? �First class� : �Not first class� );
c) Printf(�%s\n�, PASS);
d) All of the above
ANSWER: D
2.Do-While loop terminates when conditional expression returns?
a) Zero
b) One
c) Non-zero
d) -1
ANSWER: A
3.In the following loop construct, which one is executed only once always.
for ( exp1; exp2; exp3) {. . . }
a) exp1
b) exp3
c) exp1 and exp3
d) exp1, exp2 and exp3
ANSWER: A
4. if default statement is omitted and there is no match with the case table
a) No statement within switch case will be executed
b) Syntax error is produced
c) Executes all the statements in the switch case construct
d) Executes the last case statement only
ANSWER: A
5.What will be printed when the above code is executed?
main()
{
int a = 2, b = 4, c = 8, x = 4;
if ( x == b) x = a; else x = b;
if( x != b) c = c + b; else c = c + a;
printf(�c = %d\n�,c);
}
a) C = 4
b) C = 8
c) C = 10
d) C = 12
ANSWER: D
Update Contact :
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email : Fajarudinsidik@gmail.com
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email: Fajarudinsidik@gmail.com
atau Kirimkan Private messanger melalui email dengan klik tombol order dibawah ini :