Pre-Test
- Which of the following is not an arithmetic operation?
- What is the precedence of arithmetic operators (from highest to lowest)?
- What will be the output of the following C code?
#include
voidmain()
{
int a =3;
int b =++a + a+++--a;
printf("Value of b is %d", b); - Which among the following are the fundamental arithmetic operators, i.e., performing the desired operation can be done using that operator only?
- What will be the output of the following C code?
#include
intmain()
{
int a =10;
double b =5.6;
int c;
c = a + b;
printf("%d", c);
}
a * = 10;
a / = 10;
a ! = 10;
a % = 10;
%,*, /, +,-
%, +, /, *, –
+, -, %, *, /
%, +, -, *, /
}
Value of x is 12
Value of x is 13
Value of x is 10
Undefined behaviour
+, –
+, -, %
+, -, *, /
+, -, *, /, %
15
16
15.6
10
