Hi All
I dont have much idea about unsigned char. I know only the range of the unsigned char i.e 0 to 255.
I want to copy this long data into a unsigned char array
unsigned long a=59128808
unsigned char b[20];
I want to copy using only memcpy and not through sprintf. I dont mind creating a pointer to long and then copying to array.
I tried to copy but I was not successful. I am getting some wrong output.
Anyone please write a program so that it copies and gives the proper output. Or tell me when the range exceeds how it will behave with respect to unsigned long and unsigned char.
Thanks & Regards
Sathish Kumar
I dont have much idea about unsigned char. I know only the range of the unsigned char i.e 0 to 255.
I want to copy this long data into a unsigned char array
unsigned long a=59128808
unsigned char b[20];
I want to copy using only memcpy and not through sprintf. I dont mind creating a pointer to long and then copying to array.
I tried to copy but I was not successful. I am getting some wrong output.
Anyone please write a program so that it copies and gives the proper output. Or tell me when the range exceeds how it will behave with respect to unsigned long and unsigned char.
Thanks & Regards
Sathish Kumar
Comment