main()
{
float me = 1.1;
double you = 1.1;
if(me==you)
printf("I love U");
else
printf("I hate U");
}
Answer / susie
Answer :
I hate U
Explanation:
For floating point numbers (float, double, long
double) the values cannot be predicted exactly. Depending on
the number of bytes, the precession with of the value
represented varies. Float takes 4 bytes and long double
takes 10 bytes. So float stores 0.9 with less precision than
long double.
Rule of Thumb:
Never compare or at-least be cautious when using
floating point numbers with relational operators (== , >, <,
<=, >=,!= ) .
| Is This Answer Correct ? | 12 Yes | 0 No |
Write a C function to search a number in the given list of numbers. donot use printf and scanf
Write a c program to search an element in an array using recursion
typedef struct error{int warning, error, exception;}error; main() { error g1; g1.error =1; printf("%d",g1.error); }
#define square(x) x*x main() { int i; i = 64/square(4); printf("%d",i); }
4 Answers Google, HCL, Quick Heal, WTF,
main() { int i=5; printf("%d",++i++); }
main() { printf("%x",-1<<4); }
main() { int i=1; while (i<=5) { printf("%d",i); if (i>2) goto here; i++; } } fun() { here: printf("PP"); }
could you please send the program code for multiplying sparse matrix in c????
main() { float i=1.5; switch(i) { case 1: printf("1"); case 2: printf("2"); default : printf("0"); } }
char inputString[100] = {0}; To get string input from the keyboard which one of the following is better? 1) gets(inputString) 2) fgets(inputString, sizeof(inputString), fp)
main() { 41printf("%p",main); }8
main() { unsigned char i=0; for(;i>=0;i++) ; printf("%d\n",i); }