What happens if you try to compile and run this program?

Last Updated on April 30, 2022 by Admin 2

What happens if you try to compile and run this program?

#include <stdio.h>

int main(void)
{
   float x, y;
   int i, j;

   x = 1.5; y = 2.0;
   i = x * y + (float)i / j;

   printf("%f", x);
   return 0;
}
  • the program outputs3.500000
  • the program outputs2.000000
  • the program outputs3.000000
  • the program outputs4.000000
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments