what is the output of the following programming????
and am confusing is unsigned int stores signed integer, and
what is ‘ ~ ’ this symbol ?? and what happened when assigning ‘~0’ to y????? and
what will be printed when x,y are printing and how …?
can anyone tell me how it happened ..Thankyou…..!
#include<stdio.h>
int main()
{
unsigned int x = -1;
int y = ~0;
if (x == y)
printf ( "same" );
else
printf ( "not same" );
printf("\n x is %u, y is %u", x, y);
return 0;
}
|
|