1.Which of the following is not a compound assignment operator?
a) /=
b) +=
c) %=
d) ==�
ANSWER: d) ==
2.What will be the output of the following code snippet?
Y = 5;
if (! Y > 10)
X = Y + 3;
else
X = Y + 10;
printf(� X = %d Y = %d�, X, Y);
a) The program will print X = 15 Y = 5�
b) The program will print X = 15 Y = 0
c) The program will print X = 8 Y = 5
d) The program will print X = 3 Y = 0
ANSWER: a) The program will print X = 15 Y = 5
3.Which of the following statement is correct about the code snippet given below?
num = 5;
printf( �%d�, ++num++ );
a) The code will print 5
b) The code will print 6
c) The code will result in L � value required�
d) The code will result in R � value required
ANSWER: c) The code will result in L � value required
4.Which of the following statement is correct about the code snippet given below?
#include < stdio.h>
int main()
{
float z = 12.35, c = 10;
if( ++z%10 -z)
c += z;�
else
c - = z;
printf( �%f %f�, z, c);
return 0;
}
a) The program will result in compile time error�
b) The program will print 12.35 22.35
c) The program will print 13.35 22.35
d) The program will print 1.35 11.35
ANSWER: a) The program will result in compile time error
5.Which of the following statement is correct about the code snippet given below?
#include < stdio.h>
int main()
{
int n = 12, k;
printf(�%d�, (k = sizeof( n + 12.0))++);
return 0;
}
a) The code will print 17
b) The code will print 5
c) The code will result compile time error�
d) The code will print 4
ANSWER: c) The code will result compile time error
CONTINUE READING �
a) /=
b) +=
c) %=
d) ==�
ANSWER: d) ==
2.What will be the output of the following code snippet?
Y = 5;
if (! Y > 10)
X = Y + 3;
else
X = Y + 10;
printf(� X = %d Y = %d�, X, Y);
a) The program will print X = 15 Y = 5�
b) The program will print X = 15 Y = 0
c) The program will print X = 8 Y = 5
d) The program will print X = 3 Y = 0
ANSWER: a) The program will print X = 15 Y = 5
3.Which of the following statement is correct about the code snippet given below?
num = 5;
printf( �%d�, ++num++ );
a) The code will print 5
b) The code will print 6
c) The code will result in L � value required�
d) The code will result in R � value required
ANSWER: c) The code will result in L � value required
4.Which of the following statement is correct about the code snippet given below?
#include < stdio.h>
int main()
{
float z = 12.35, c = 10;
if( ++z%10 -z)
c += z;�
else
c - = z;
printf( �%f %f�, z, c);
return 0;
}
a) The program will result in compile time error�
b) The program will print 12.35 22.35
c) The program will print 13.35 22.35
d) The program will print 1.35 11.35
ANSWER: a) The program will result in compile time error
5.Which of the following statement is correct about the code snippet given below?
#include < stdio.h>
int main()
{
int n = 12, k;
printf(�%d�, (k = sizeof( n + 12.0))++);
return 0;
}
a) The code will print 17
b) The code will print 5
c) The code will result compile time error�
d) The code will print 4
ANSWER: c) The code will result compile time error
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 :