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 program to print ‘Campus Force training’ without using even a single semicolon in the program.
write a program in c language to get the value of arroy keys pressed and display the message which arrow key is pressed?
Finding a number multiplication of 8 with out using arithmetic operator
Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.
Is the following code legal? typedef struct a aType; struct a { int x; aType *b; };
write a c program to Create a mail account by taking the username, password, confirm password, secret_question, secret_answer and phone number. Allow users to register, login and reset password(based on secret question). Display the user accounts and their details .
write a c program to print magic square of order n when n>3 and n is odd?
Give a oneline C expression to test whether a number is a power of 2?
25 Answers EA Electronic Arts, Google, Motorola,
int aaa() {printf(“Hi”);} int bbb(){printf(“hello”);} iny ccc(){printf(“bye”);} main() { int ( * ptr[3]) (); ptr[0] = aaa; ptr[1] = bbb; ptr[2] =ccc; ptr[2](); }
#define max 5 #define int arr1[max] main() { typedef char arr2[max]; arr1 list={0,1,2,3,4}; arr2 name="name"; printf("%d %s",list[0],name); }
How can you relate the function with the structure? Explain with an appropriate example.
main() { int i=-1; +i; printf("i = %d, +i = %d \n",i,+i); }