Well, we can read data from a buffer, that's for sure :). What we need is buffer start address and its size. Just assigning buffer start address to void* or char* or byte* (using cast when needed) is enough.
Printing your buffer out is not that straightforward, however. You must make decision on the output format you would like to see. Would you like to interpret your buffer as array of chars in one of encodings (ASCII, Unicodes etc)? Or you don't care about your output having meaning at least sometimes? In the first case you're free to use
printf()
function or stdout. Otherwise... well,
printf()
can help you again: to write your buffer out in hex you can use it too, printing byte by byte, in a manner described
here[
^] (I guess you'd need to use something like
printf("%X", (unsigned char)array_item[i]);
or
printf("%hhX", (char)array_item[i]);
)