main()
{
float a=8.8;
double b=8.8;
if(a==b)
printf("Equal");
else
printf("not equal");
getch();
}
what is the output?
with reason
Answer Posted / hema
If i want to compare the value stored in float and double,
how do i do that? I tried typecasting i,e.,
if (a==float(b))
printf("Equal");
else
printf("not equal");
Even then it say, not equal. How to overcome this problem?
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is void main ()?
What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }
Why enum is used in c?
There seem to be a few missing operators ..
Why do we use namespace feature?
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
What is a null string in c?
What is the collection of communication lines and routers called?
Explain about the functions strcat() and strcmp()?
What is the difference between strcpy() and memcpy() function in c programming?
main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above
Explain what are multidimensional arrays?
What is default value of global variable in c?
What is your stream meaning?
Explain pointers in c programming?