-
November 22nd, 2008, 08:08 PM
#1
How do I print out a byte array as a string?
Hey guys,
I am having problems printing out the string conversion value for an array of bytes. How do I do this?
My code so far looks like this:
int p=0;
while (p < sizeof(input))
{
printf("%s",(char)input[p]);
p++;
}
where input is my array of bytes in hex. Now, I needed to print out the ASCII equivalent of the bytes in the array.
Thanks in advance for any help.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|