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");
}

Answers were Sorted based on User's Feedback



What is the output for the below program? void main() { float me=1.1; double you=1.1; if(me==..

Answer / revathi pawar

know c is the answer because float and double r not same
the memory allocation differs so know c will b printed

Is This Answer Correct ?    10 Yes 2 No

What is the output for the below program? void main() { float me=1.1; double you=1.1; if(me==..

Answer / anuradha

know c because do not compare float and double values

Is This Answer Correct ?    6 Yes 0 No

What is the output for the below program? void main() { float me=1.1; double you=1.1; if(me==..

Answer / sangeetha

the answer for the above code will be know c because else
part is printed because float and double is not same

Is This Answer Correct ?    3 Yes 0 No

What is the output for the below program? void main() { float me=1.1; double you=1.1; if(me==..

Answer / smartmove

Correction in last answer:

float me=1.1 it stores like 1.0999
double you=1.09999999

Is This Answer Correct ?    3 Yes 0 No

What is the output for the below program? void main() { float me=1.1; double you=1.1; if(me==..

Answer / 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

What is the output for the below program? void main() { float me=1.1; double you=1.1; if(me==..

Answer / suresh

love c

Is This Answer Correct ?    1 Yes 5 No

What is the output for the below program? void main() { float me=1.1; double you=1.1; if(me==..

Answer / kumar

love c

Is This Answer Correct ?    4 Yes 11 No

Post New Answer

More C Interview Questions

write a c program to calculate sum of digits till it reduces to a single digit using recursion

0 Answers   IBM,


i want explaination about the program and its stack reprasetaion fibbo(int n) { if(n==1 or n==0) return n; else return fibbo(n-1)+fibbo(n-2); } main() { fibbo(6); }

2 Answers  


Is it better to use a macro or a function?

0 Answers  


f(char *p) { p=(char *)malloc(sizeof(6)); strcpy(p,"HELLO"); } main() { char *p="BYE"; f(p) printf("%s",p); } what is the output?

9 Answers   Hughes, Tech Mahindra,


What is a program flowchart and explain how does it help in writing a program?

0 Answers  






How can I make sure that my program is the only one accessing a file?

0 Answers  


What does node * mean?

0 Answers  


What should malloc() do?

0 Answers  


Why header files are used?

0 Answers  


Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?

0 Answers   Case, IBM,


What is the difference between struct and union in C?

1 Answers  


Why is sprintf unsafe?

0 Answers  


Categories