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
write a programming in c to find the sum of all elements in an array through function.
Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.
Is c weakly typed?
When should the register modifier be used? Does it really help?
What is array of structure in c?
write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3
Explain how do you declare an array that will hold more than 64kb of data?
What are enums in c?
What are the types of type qualifiers in c?
Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?
Are pointers really faster than arrays?
Why is it important to memset a variable, immediately after allocating memory to it ?
When should structures be passed by values or by references?
Difference between strcpy() and memcpy() function?
Explain why c is faster than c++?