Byte order (endian) of int in NSLog?

Posted by Eonil on Stack Overflow See other posts from Stack Overflow or by Eonil
Published on 2010-05-14T18:25:11Z Indexed on 2010/05/14 18:34 UTC
Read the original article Hit count: 213

Filed under:
|
|
|

NSLog function accepts printf format specifiers. My question is about %x specifier. Does this print hex codes as sequence on memory? Or does it have it's own printing sequence style?

unsigned int a = 0x000000FF;
NSLog(@"%x", a);

Results of above code on little or big endian processors are equal or different? And how about NSString's -initWithFormat method? Does it follows this rule equally?

© Stack Overflow or respective owner

Related posts about c

    Related posts about format