Computer Science, asked by sw5etadavksat, 1 year ago

Evaluate the C Program
#include int main() { int x = 3; float y = 3.0; if(x == y) printf("x and y are equal"); else printf("x and y are not equal"); return 0; }

Answers

Answered by kvnmurty
4
int x = 3   ; float   y = 3.0 ;

while compare integer x with  floating value y, the value of x is converted in to float value  3.0.... hence both will be equal.

so  x and y are equal  will be printed.

vaishu12: sir u even know c programming???
vaishu12: amazing sir
kvnmurty: you are very nice to say that... thanks !!
kvnmurty: how about you ? do u know software programming ? C , java, c++ ?
vaishu12: sir am jus beginer i am learning c++
Similar questions