Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is void main ()?

1073


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); } }

2490


Why enum is used in c?

946


There seem to be a few missing operators ..

1046


Why do we use namespace feature?

1051


Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

1080


What is a null string in c?

1031


What is the collection of communication lines and routers called?

1120


Explain about the functions strcat() and strcmp()?

1044


What is the difference between strcpy() and memcpy() function in c programming?

1082


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

1083


Explain what are multidimensional arrays?

1060


What is default value of global variable in c?

982


What is your stream meaning?

1226


Explain pointers in c programming?

1106