DETERMINE THE EXPECTED RESULT

Good day, I am a novice at C++ programming and would appreciate your comments.
Regards, Werner.

//DETERMINE THE EXPECTED RESULT OF 'dest' FOR THE FOLLOWING INPUT DATA TO 'Function1'
void Function1 (unsigned char *dest, unsigned char *src, int len)
{
int i;
unsigned char temp;
for (i=0; i<len; i++)
{
temp = src[i];
dest[i] = (temp >> 4) | (temp << 4);
}
}

void Results1( unsigned char *dest, int len)
{
cout <<"The hexadecimal intergers of to are : ";
for (int i=0; i<len; i++)
{

cout << hex << setfill('0') << setw(2) << int(dest[i])<<','<<"\t";

}

cout <<"\n\nThe decimal intergers of to are : ";

for(int j=0; j<len; j++)
{
cout<< dec << setfill('0') << setw(2) << int(dest[j])<<','<<"\t";
}
}
Topic archived. No new replies allowed.