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 are the advantages and disadvantages of c language?

540


Why is python slower than c?

575


Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..

625


What is the use of #include in c?

553


What does dm mean sexually?

788






What is string constants?

637


What are linker error?

594


Is it valid to address one element beyond the end of an array?

654


What does c mean?

563


How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?

15434


Explain what will be the outcome of the following conditional statement if the value of variable s is 10?

715


What is #include stdlib h?

592


What is the difference between NULL and NUL?

695


How can I manipulate strings of multibyte characters?

609


What is the difference between the local variable and global variable in c?

503