Comment on the output of the following C code. #include <stdio.h> ...
View Question
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int a = 2;
if (a >> 1)
printf(“%d\n”, a);
}
What will be the output of the following C code? #include <stdio.h> ...
View Question
What will be the output of the following C code?
#include <stdio.h>
int main()
{
if (7 & 8)
printf(“Honesty”);
if ((~7 & 0x000f) == 8)
printf(“is the best policy\n”);
}
What will be the output of the following C code? #include <stdio.h> ...
View Question
What will be the output of the following C code?
#include <stdio.h>
int main()
{
unsigned int a = 10;
a = ~a;
printf(“%d\n”, a);
}
What will be the output of the following C code? #include <stdio.h> ...
View Question
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int c = 2 ^ 3;
printf(“%d\n”, c);
}
What will be the output of the following C code? #include <stdio.h> ...
View Question
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int a = -5;
int k = (a++, ++a);
printf(“%d\n”, k);
}
What will be the output of the following C code? #include <stdio.h> ...
View Question
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int a = 5, b = -7, c = 0, d;
d = ++a && ++b || ++c;
printf(“\n%d%d%d%d”, a, b, c, d);
}
What will be the output of the following C code? #include <stdio.h> void ...
View Question
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int x = 4;
int *p = &x;
int *k = p++;
int r = p – k;
printf(“%d”, r);
}
What will be the output of the following C code? #include <stdio.h> ...
View Question
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int x = 4, y, z;
y = –x;
z = x–;
printf(“%d%d%d”, x, y, z);
}
What will be the output of the following C code? #include <stdio.h> ...
View Question
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int x = 97;
int y = sizeof(x++);
printf(“X is %d”, x);
}
What will be the output of the following C code? #include <stdio.h> ...
View Question