Arithmetic Operator
1. Addition or unary plus(+)
2. Subtraction or unary minus(-)
3. Multiplication(*)
4. Division(/)
5. Reminder after division or modulo division(%)
6. Increment (++)
7. Decrement (--)
MCQ
1 What will be the output of the following code segment?
int x = 24, y = 39, z = 45;
z = x + y;
y = z - y;
x = z - y;
printf("\n%d %d %d", x, y, z);
A) 24 39 63
B) 39 24 63
C) 24 39 45
D) 39 24 45
2 If ‘a’ is an integer variable, then a = 5/2 will return a value
2 If ‘a’ is an integer variable, then a = 5/2 will return a value
A) 2.5
B) 2
C) 2.000000
D) 2.500000
Question:
1. Output the code:-
int x = 7538;
printf("%d %d\n", x % 100, x / 10);
True/False
Question:
1. Output the code:-
int x = 7538;
printf("%d %d\n", x % 100, x / 10);
No comments:
Post a Comment