0
What is the output of the following C program?
#include <stdio.h>
int main() {
int a = 7, b = 2;
printf("%d %d %.1f", a / b, a % b, (float)a / b);
return 0;
}- A3 1 4.0
- B3.5 1 3
- C3 1 3.0
- D3 1 3.5
Correct answer: D
What is the output of the following C program?
#include <stdio.h>
int main() {
int a = 7, b = 2;
printf("%d %d %.1f", a / b, a % b, (float)a / b);
return 0;
}