Operators
- What will be the final value of x in the following C code?
#include <stdio.h>
void main()
{
int num = 11 * 6 / 5 + 23;
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
36
- What will be the output of the following C code?
#include <stdio.h>
int main()
{
int k = -13;
k = k / 3;
printf("%d\n", k);
return 0;
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
-4
- What will be the output of the following C code?
#include <stdio.h>
void main()
{
int num = 7.5 % 3;
printf("Value of x is %d", num);
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
Compilation Error
- What will be the output of the following C code?
#include <stdio.h>
int main()
{
int n = 12;
int m = n / -5;
int p = n % -5;
printf("%d %d\n", m, p);
return 0;
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
-2 2
- What will be the output of the following C code?
#include <stdio.h>
int main()
{
int n = -5;
int m = n % 2;
printf("%d\n", m);
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
-1