Hello all,
I am trying to understand char pointer. In my program I am having 4 bytes number (12345678) and using char* I am trying to separate, save in char array and print each byte, but I am successful in only first byte (i.e. 78) but as soon as I am trying to print next byte by incrementing char pointer it is displaying garbage value. Please help me where I am going wrong? Please go through my code.
Problem solved, Thanks a lot aProgrammer,
OUTPUT is 78563412 which is correct. Thanks Easyrider83 for your instant reply, can you tell me how can i use union to do the same process?
Problem solved, Thanks a lot aProgrammer,
OUTPUT is 78563412 which is correct. Thanks Easyrider83 for your instant reply, can you tell me how can i use union to do the same process?