Computer Science, asked by TbiaSamishta, 10 months ago

What will be the output of the following?
void main (void)
{
float x = 1/2.0 - 1/2;
printf("%f.2f", x);
}

Answers

Answered by Anonymous
0

output of this code is 0.5  

hope it will help you.......

Answered by Secondman
0

The program will throw a compile time error during the compilation.

The reason is that the no header files are included. The program uses the printf() function without including the stdio.h which stands for Standard Input/output header file.

The printf() function itself is located inside the header file named stdio.h. So, it will not print anything on the screen as it will not be able to find the declaration of the printf() function

Similar questions