[LCP]snippets

T Srinath rangar20 at eth.net
Tue Jul 17 12:36:04 UTC 2001


the following are some snippets whose results surprise me.

main()
{
 int i=10;
 printf("%n",&i);
 printf("...%d",i);
}
...0 

void main()
{
 printf("%p ",main);
}
0291
 
void main()
{
 printf("%x",-1);
}
ffff
(i understand that negative nos are stored in 2's complement form.
 but when retrieving also it should do 2's complement and output)

 
Regards, 
Srinath Thiruvengadam

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux.org.au/pipermail/linuxcprogramming/attachments/20010717/b729df07/attachment.htm 


More information about the linuxCprogramming mailing list