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

Can a pointer be volatile in c?

957


What is NULL pointer?

1048


What is the deal on sprintf_s return value?

1084


How can I read a binary data file properly?

1110


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

1290


can any one provide me the notes of data structure for ignou cs-62 paper

2137


What is the collection of communication lines and routers called?

1082


Difference between linking and loading?

1077


What is the maximum no. of arguments that can be given in a command line in C.?

1104


How to find a missed value, if you want to store 100 values in a 99 sized array?

1376


Write a program of prime number using recursion.

1048


How many bytes is a struct in c?

1122


What is signed and unsigned?

1025


why use "return" statement a) on executing the return statement it immediately transfers the control back to the calling program b) it returns the value present in the parentheses return, to the calling program c) a & b d) none of the above

1042


What are valid operations on pointers?

1161