Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

HOW TO STORE SIGNED CHAR INTO AN INT ?

$
0
0
char is treated as signed char, what will be printed by this program:
main()
{
	char x = 0xFF;
	unsigned int y;
	int z;
	y = x; 	z = x;
	printf("%x %x\n", y, z)
}

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>