Q. What will be the output of this code?
Code:#include <stdio.h>
int main() {
float a = 5/2;
printf("%f", a);
return 0;
}
β
Correct Answer: (A)
2.000000
Explanation: Integer division 5/2 is 2, assigned to float a.