Hey Guys,
I am new to C programming and I got a task of storing hex dumps in character array and then use them as a string. I use the sprintf function for the job but it is giving me incorrect results. Please help me out. I am writing a prototype of the functionality I want to use.
#include<stdio.h>
int main()
{
char a[25];
int i;
sprintf(a,"%d%d%d",0x0000001F,0x00000001,0x00271418);
for(i=0;i<8;i++)
{
printf("\n%d",a[i]);
}
return 0;
}