"MyArray" in function Output is not an array, it's pointer (and size of any pointer, no matter of which type, is 4 bytes)
To print arrays in c++ functions, you must pass one more value to the function, and it's array's size
this would be correct function:
1 2 3 4 5 6 7 8 9 10
void Output(char MyArray[], int Num)
{
for (int x = 0; x < Num; x++)
for (int y = 0; y < Num; y++)
{
cout << MyArray[x];
if (y == Num-1)
cout << " " << MyArray[x] << endl;
}
}
and now u call funtcion like this
Output(MyArray, sizeof(MyArray));
Notice that in function, you don't work with copy of array, u just have pointer to it, and then u're able to move through array with it