Check below program and guess what will be output.
float a = 0.0;
float b = 0.0;
int c = 0;
a = (b/c) * 1000;
printf(” a = %f\n”);
- Will a be 0?
- Will a be float value like 0.000000?
- Will a have garbage value?
Knowledge point
Check below program and guess what will be output.
float a = 0.0;
float b = 0.0;
int c = 0;
a = (b/c) * 1000;
printf(” a = %f\n”);