Converting hex to string in C?
问题 Hello I am using digi dynamic c. I am trying to convert this in to string char readingreg[4]; readingreg[0] = 4a; readingreg[1] = aa; readingreg[2] = aa; readingreg[3] = a0; Currently when I do printf statements it has to be like this: printf("This is element 0: %x\n", readingreg[0]); But I want this in string so I can use printf statement like this printf("This is element 0: %s\n", readingreg[0]); I am essentialy sending the readingreg array over TCP/IP Port, for which I need to have it as