objective c - Casting between uint8_t * and char *. What happens? -


what happens when casting between these 2 in relation termination character? in c99 objective-c.

i assume char 8 bits on system in answer.

if architecture uses unsigned char char type absolutely nothing happen.

if architecture uses signed char char type negative values of char wrap around causing possibly unexpected results. never happen termination null character.


please note, "casting" nothing happens, tell compiler interpret location in memory differently. difference in interpretation create actual (side)effects of cast.


Comments

Popular posts from this blog

haskell - Using filter on an item in a list? -

c# - When does PreApplicationStartMethod actually get triggered to run? -

tomcat6 - Exception when stopping container for a with Spring + Quartz + Tomcat web application -