What does this code snippet
print:
char* foo( char* y, const
int size );
int main()
{
const int size = 15;
char* test = This is a test;
cout << foo( test, size );
return 0;
}
char* foo( char* y, const
int size )
{
char x[ size ];
for ( int i = 0; i < size; i++ )
{
x[i] = y[size-i-2];
}
x[size - 1] = \0; // Add a NULL character to the
end
return x;
}