I'm needing to collect byte by byte of an unsigned char and convert it to a string, how can I do that?
I've tried everything but it didn't work.
My example code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
unsigned char byte_loop[10] = {0xa0, 0xb1, 0xc2, 0xb3, 0xd4, 0xe5, 0xa6, 0xb7, 0xc8, 0xa9};
char text_concat[11];
for (int i = 0; i <= 10; i++)
{
text_concat[i] = byte_loop[i];
}
printf("%s", text_concat);
return 0;
}
Thanks