Operators
- What will be the output of the following C code?
#include <stdio.h>
int main()
{
int n = -5;
n = n >> 2;
printf("%d\n", n);
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
-2
- What will be the output of the following C code?
#include <stdio.h>
int main()
{
int n = -7;
if (!0 == 1)
printf("Yes\n");
else
printf("No\n");
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
Yes
- What will be the output of the following C code?
#include <stdio.h>
int main()
{
if (~2 == 3)
{
printf("Yes\n");
}
else
{
printf("No\n");
}
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: E
No
- What will be the output of the following C code?
#include <stdio.h>
int main()
{
int p = 3;
if (4 |(p = 4))
printf("p is %d\n", p);
else
printf("%d\n", p);
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: E
p is 4
- What will be the output of the following C code?
#include <stdio.h>
int main()
{
int num = 7;
num = num << 2;
printf("%d\n", num);
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
28