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

All technical questions

0 Answers   TCS,


what is the difference b/w compiler and debugger?

2 Answers   Assurgent,


Explain why can’t constant values be used to define an array’s initial size?

0 Answers  


6)swap(int x,y) { int temp; temp=x; x=y; y=temp; } main() { int x=2;y=3; swap(x,y); } after calling swap ,what are yhe values x&y?

3 Answers  


how to find turn around time in operating system?

3 Answers  






Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80

0 Answers  


What does the message "automatic aggregate intialization is an ansi feature" mean?

0 Answers  


write a program to remove duplicate from an ordered char array? in c

2 Answers  


#include<stdio.h> int fun(); int i; int main() { while(i) { fun(); main(); } printf("hello \n"); return 0; } int fun() { printf("hi"); } answer is hello.how??wat is tat while(i) mean?

7 Answers   Intel,


What is external and internal variables What is dynamic memory allocation what is storage classes in C

3 Answers  


Why array starts with index 0

2 Answers  


Why cann't whole array can be passed to function as value.

1 Answers  


Categories