Vidyalelo
C Programming · Q301

C Fundamentals

Programming · C Programming · question 301

Q301

What will be the output of the following C code? #include int main() int i = 3; int l = i / -2; int k = i % -2; printf("%d %d ", l, k); return 0;

A.
Compile time error
B.
-1 1
Answer
C.
1 -1
D.
Implementation defined

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board