91. Which keyword is used to prevent any changes in the variable within a C program?
92. What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 2, y = 0;
int z = y && (y |= 10);
printf("%d\n", z);
return 0;
}
#include <stdio.h>
int main()
{
int x = 2, y = 0;
int z = y && (y |= 10);
printf("%d\n", z);
return 0;
}
93. Which of the following is not an arithmetic operation?
94. What will be the output of the following C code?
#include<stdio.h>
enum hi{a,b,c};
enum hello{c,d,e};
main()
{
enum hi h;
h=b;
printf("%d",h);
return 0;
}
#include<stdio.h>
enum hi{a,b,c};
enum hello{c,d,e};
main()
{
enum hi h;
h=b;
printf("%d",h);
return 0;
}
95. 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");
}
#include <stdio.h>
int main()
{
if (7 & 8)
printf("Honesty");
if ((~7 & 0x000f) == 8)
printf("is the best policy\n");
}
96. What will be the output of the following C code?
#include<stdio.h>
enum Shyam
{
a,b,c=5
};
int main()
{
enum Shyam s;
b=10;
printf("%d",b);
}
#include<stdio.h>
enum Shyam
{
a,b,c=5
};
int main()
{
enum Shyam s;
b=10;
printf("%d",b);
}
97. What will be the output of the following C code?
#include <stdio.h>
void main()
{
int y = 3;
int x = 5 % 2 * 3 / 2;
printf("Value of x is %d", x);
}
#include <stdio.h>
void main()
{
int y = 3;
int x = 5 % 2 * 3 / 2;
printf("Value of x is %d", x);
}
98. What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 1, y = 2;
if (x && y == 1)
printf("true\n");
else
printf("false\n");
}
#include <stdio.h>
int main()
{
int x = 1, y = 2;
if (x && y == 1)
printf("true\n");
else
printf("false\n");
}
99. Which of the following type-casting have chances for wrap around?
100. What will be the output of the following C code?
#include <stdio.h>
int main()
{
int a = 10, b = 5, c = 5;
int d;
d = a == (b + c);
printf("%d", d);
}
#include <stdio.h>
int main()
{
int a = 10, b = 5, c = 5;
int d;
d = a == (b + c);
printf("%d", d);
}
Read More Section(C Fundamentals)
Each Section contains maximum 100 MCQs question on C Fundamentals. To get more questions visit other sections.