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
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 |
Answer / anuradha
know c because do not compare float and double values
Is This Answer Correct ? | 6 Yes | 0 No |
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 |
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 |
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 |
All technical questions
what is the difference b/w compiler and debugger?
Explain why can’t constant values be used to define an array’s initial size?
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?
how to find turn around time in operating system?
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
What does the message "automatic aggregate intialization is an ansi feature" mean?
write a program to remove duplicate from an ordered char array? in c
#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?
What is external and internal variables What is dynamic memory allocation what is storage classes in C
Why array starts with index 0
Why cann't whole array can be passed to function as value.