Operators
- What will be the output of the following C code?
#include <stdio.h>
void main()
{
int num1 = 5;
int num2 = 10 % 3 * 12 / 4;
printf("Value of num is %d", num2);
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
Value of num is
- 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 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>
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