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 |
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
What are the string functions? List some string functions available in c.
Identify the operators that is not used with pointer a. && b. # c. * d. >>
atoi, which takes a string and converts it to an integer. write a program that reads lines(using getline), converts each line to an integer using atoi and computes the average of all the numbers read. also compute the standard deviation
How to write in a function declaration and in function call in which the function has 'n' number of varible or arguments?
O,T,T,F,F,S,S,E,N,?,?,?,T,F,F,S,S,E,N
#define min((a),(b)) ((a)<(b))?(a):(b) main() { int i=0,a[20],*ptr; ptr=a; while(min(ptr++,&a[9])<&a[8]) i=i+1; printf("i=%d\n",i);}
What is floating point constants?
What is a macro in c preprocessor?
How many levels deep can include files be nested?
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
Write a program to print all the prime numbers with in the given range
8 Answers ABC, College School Exams Tests, TCS,