What is the output for the below program?
void main()
{
float me=1.1;
double you=1.1;
if(me==you)
printf("love c");
else
printf("know c");
}
Answer Posted / kalyan chukka
The Answer is Know c Because float having 7 digit numbers
and double having 15 digit number
float me=1.1 it stores like 0.99999
double you=1.099999999
so the Correct Answer is Know C
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is the best style for code layout in c?
Why is c fast?
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
What is the purpose of scanf() and printf() functions?
What is a node in c?
What is quick sort in c?
How many header files are in c?
What is the use of define in c?
What is the difference between array and linked list in c?
Here is a neat trick for checking whether two strings are equal
Is a house a shell structure?
What are linker error?
if p is a string contained in a string?
How can I get random integers in a certain range?