1.What would be the output of the following program?
main()
{
char *str[] = {�Frog�,�Do�,�Not�, �Die.�,�They�,�Croak!�};
printf(�%d %d�, sizeof (str), sizeof (str[0]));
}
a) 3 12
b) 2 12
c) 12 3
d) 12 2
ANSWER: D
2.What would be the output of the following program?
main()
{
char str1[] = �Hello�;
char str2[] = �Hello�;
if(str1 == str2)
printf(�Equal�);
else
printf(�\nUnequal�);
}
a) Error.
b) Equal.
c) Unequal.
d) None.
ANSWER: C
3.Would the following code give any error on compilation?
strcat (string,�!�);
a) Yes.
b) No.
ANSWER: A
4.What will happen if I use this code in my program?
#define TRACE(n) printf("TRACE: %d\n", n)
a) Nothing it is good.
b) Code is wrong.
c) Error: macro replacement within a string literal
d) None�
ANSWER: C
5.How can I print a '%' character in a printf format string?
a) Use �\%�
b) Use �/%�
c) None
d) Use �%%�
ANSWER: D
CONTINUE READING �
main()
{
char *str[] = {�Frog�,�Do�,�Not�, �Die.�,�They�,�Croak!�};
printf(�%d %d�, sizeof (str), sizeof (str[0]));
}
a) 3 12
b) 2 12
c) 12 3
d) 12 2
ANSWER: D
2.What would be the output of the following program?
main()
{
char str1[] = �Hello�;
char str2[] = �Hello�;
if(str1 == str2)
printf(�Equal�);
else
printf(�\nUnequal�);
}
a) Error.
b) Equal.
c) Unequal.
d) None.
ANSWER: C
3.Would the following code give any error on compilation?
strcat (string,�!�);
a) Yes.
b) No.
ANSWER: A
4.What will happen if I use this code in my program?
#define TRACE(n) printf("TRACE: %d\n", n)
a) Nothing it is good.
b) Code is wrong.
c) Error: macro replacement within a string literal
d) None�
ANSWER: C
5.How can I print a '%' character in a printf format string?
a) Use �\%�
b) Use �/%�
c) None
d) Use �%%�
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 :