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

int i=10; printf("%d %d %d", i, i=20, i);

1626


What are the c keywords?

1206


What is integer constants?

1083


hi, which software companys will take,if d candidate's % is jst 55%?

2093


What is structure padding in c?

1135


Explain goto?

1159


Difference between Function to pointer and pointer to function

1085


What is the difference between struct and union in C?

1316


Why clrscr is used in c?

1017


Which header file should you include if you are to develop a function which can accept variable number of arguments?

1405


What is a pointer in c?

1576


Explain the process of converting a Tree into a Binary Tree.

2670


Can variables be declared anywhere in c?

1095


How many data structures are there in c?

1127


What are the different types of linkage exist in c?

1034