Operators
- What will be the output of the following C code?
#include <stdio.h>
void main()
{
int p = 5;
int q = ++p + p++ + --p;
printf("Value of q is %d", q);
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
Value of q is 19
- Which of the following is not an arithmetic operation?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
a != 10;
- What is the precedence of arithmetic operators (from highest to lowest)?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
%, *, /, +, –
- What will be the output of the following C code?
#include <stdio.h>
int main()
{
int k = 2;
if (k++ && (k == 3))
{
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>
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