Question PRG-C-0022
EasyWhat is the output of this program?
#include <stdio.h>
int main() {
int a = 10, b = 3;
printf("%d", a / b);
return 0;
}
- A.
3
- B.
3.333333
- C.
Show answer and explanation
Answer: A
Both operands are int, so / does integer division and drops the fraction.