I have the following code, the output is a lot of numbers. I am wondering how to interpret the significance, if any, of those numbers. My first instinct is to read the numbers in pairs and convert that number to hex, but that is just a guess. Can anyone enlighten me as to what path I should take from here.
What I understand about this is that the program is reading 1000 characters backwards through the memory from where p is created.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <iostream>
usingnamespace std;
int main()
{
unsignedchar *p;
int i;
p = newunsignedchar;
for(i = 1000; i > 0; --i) //1000 is an arbitrary number, could be anything.
{
cout << static_cast<unsigned>(p[i]) << " ";
}
cout << endl;
cin.get();
}
So really all I would like to know is there any validity to the output of this, or is it just going to be useless?