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 |
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }
int i=10; main() { extern int i; { int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); }
main(){ unsigned int i; for(i=1;i>-2;i--) printf("c aptitude"); }
Predict the Output: int main() { int *p=(int *)2000; scanf("%d",2000); printf("%d",*p); return 0; } if input is 20 ,what will be print
void main() { char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof(farthest)); }
hello sir,is there any function in C that can calculate number of digits in an int type variable,suppose:int a=123; 3 digits in a.what ll b answer?
main() { 41printf("%p",main); }8
void main() { int i=i++,j=j++,k=k++; printf(ā%d%d%dā,i,j,k); }
Find the largest number in a binary tree
main() { int i=-1; +i; printf("i = %d, +i = %d \n",i,+i); }
#include<stdio.h> main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p + ++*str1-32); }
Write a routine to implement the polymarker function