TCS
Company
Programming
Program
what will be the o/p of the program
main()
{
float me = 1.1;
double you = 1.1;
if(me==you)
printf("I love m4math");
else
printf("I realy like m4math");
}
Read Solution (Total 9)
-
- Output : I really like m4math
Float nd double variables may not be equal even if it has the same value, it ll differ in the precision...
Float variables ll have the precision of 8 nd double has the precision of 16... - 10 years agoHelpfull: Yes(16) No(0)
- i really like m4math
- 10 years agoHelpfull: Yes(0) No(0)
- i realy like m4math
- 10 years agoHelpfull: Yes(0) No(0)
- usually in c floating point values are not checked in if condition .thus the result is unpredictable
- 9 years agoHelpfull: Yes(0) No(0)
- The o/p will be I realy like m4math..since even though we declare me and you as 1.1 their data types are different so me is not equal to you...
- 9 years agoHelpfull: Yes(0) No(0)
- I really like m4math
- 7 years agoHelpfull: Yes(0) No(0)
- i really like m4 math is answer
- 7 years agoHelpfull: Yes(0) No(0)
- i realy like m4maths
- 7 years agoHelpfull: Yes(0) No(0)
- I realy like m4math as float and double are different.
- 6 years agoHelpfull: Yes(0) No(0)
TCS Other Question