Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 76
1-
The modulus operator cannot be used with a long double.
A -
True
B -
False
2-
What will be the output of the program?
#include<stdio.h>
int main()
{
int i=-3, j=2, k=0, m;
m = ++i && ++j && ++k;
printf("%d, %d, %d, %d\n", i, j, k, m);
return 0;
}
A -
-2, 3, 1, 1
B -
2, 3, 1, 2
C -
1, 2, 3, 1
D -
3, 3, 1, 2
3-
In a function two return statements should never occur.
A -
Yes
B -
No
4-
It is necessary that a header files should have a .h extension?
A -
Yes
B -
No
5-
How many bytes are occupied by near, far and huge pointers (DOS)?
A -
near=2 far=4 huge=4
B -
near=4 far=8 huge=8
C -
near=2 far=4 huge=8
D -
near=4 far=4 huge=8
6-
What will be the output of the program ?
#include<stdio.h>
int main()
{
int x=30, *y, *z;
y=&x; /* Assume address of x is 500 and integer is 4 byte size */
z=y;
*y++=*z++;
x++;
printf("x=%d, y=%d, z=%d\n", x, y, z);
return 0;
}