float a = 14; int c = 10;
Find double b= a % c;
Answers
Answered by
1
Answer:
iTz Me ❤️
FoLLow Me
And tHaNks To All My aNsweRs
Answered by
0
Predict the output of the following C program.
#include<stdio.h>
int main()
{
float x = 0.1;
if (x == 0.1)
printf("IF");
else if (x == 0.1f)
printf("ELSE IF");
else
printf("ELSE");
}
The output of above program is “ELSE IF” which means the expression “x == 0.1” returns false and expression “x == 0.1f” returns true.
Let consider the following program to understand the reason behind the above output.
#include<stdio.h>
int main()
{
float x = 0.1;
printf("%d %d %d", sizeof(x), sizeof(0.1), sizeof(0.1f));
return 0;
}
The output of above program is "4 8 4" on a typical C compiler.
It actually prints size of float, size of double and size of float.
Similar questions
Chemistry,
2 months ago
Social Sciences,
2 months ago
Math,
2 months ago
Social Sciences,
4 months ago
Math,
4 months ago
Business Studies,
10 months ago
Accountancy,
10 months ago
Business Studies,
10 months ago