CSE MCQs :: C-MCQs
-
What is the output of this C code?
int main()
{
int a = 20;
double b = 15.6;
int c;
c = a + b;
printf("%d", c);
} -
What is the output of this C code?
int main()
{
int a = 20, b = 15, c = 5;
int d;
d = a == (b + c);
printf("%d", d);
} -
What is the output of this C code?
void main()
{
int x = 0;
if (x = 0)
printf("Its zero\n");
else
printf("Its not zero\n");
} -
What is the output of this C code?
void main()
{
int k = 8;
int x = 0 == 1 && k++;
printf("%d%d\n", x, k);
} -
What is the output of this C code?
void main()
{
char a = 'a';
int x = (a % 10)++;
printf("%d\n", x);
} -
What is the output of this C code?
void main(){
1 < 2 ? return 1: return 2;
} -
What is the output of this C code?
void main()
{
unsigned int x = -5;
printf("%d", x);
} -
What is the output of this C code?
int main()
{
int x = 2, y = 1;
x *= x + y;
printf("%d\n", x);
return 0;
} -
What is the output of this C code?
int main()
{
int x = 2, y = 2;
x /= x / y;
printf("%d\n", x);
return 0;
} -
What is the type of the below assignment expression if x is of type float, y is of type int?
y = x + y;