26. What is the output of the following code snippet?
#include<stdio.h>
int main()
{
int x = 5;
int y = 3;
printf(“%d”, x || y);
return 0;
}
a) 0
b) 1
c) 5
d) 3
Answer: b) 1
27. What is the output of the following code snippet?
#include<stdio.h>
int main()
{
int x = 5;
int y = 3;
printf(“%d”, x % y);
return 0;
}
a) 3
b) 5
c) 8
d) 2
Answer: d) 2
28. Which of the following is not a valid type modifier in C?
a) signed
b) float
c) const
d) volatile
Answer: b) float
29. What is the output of the following code snippet?
#include<stdio.h>
int main()
{
int x = 5;
int y = 3;
printf(“%d”, x != y);
return 0;
}
a) 0
b) 1
c) 5
d) 3
Answer: b) 1
30. What is the output of the following code snippet?
#include<stdio.h>
int main()
{
int x = 5;
int y = 3;
printf(“%d”, sizeof(x));
return 0;
}
a) 2
b) 4
c) 8
d) 1
Answer: b) 4