I'm getting weird letters and numbers when the array is being shown. What is the problem? I've initialized array1 with 10,20,...etc. So shouldn't it cout those numbers?
#include <iostream>
using namespace std;
void reverseArray(int[], int);
int main() {//start main
const int size = 5; //constant size of array is 5
int array1[size] = {10,20,30,40,50};
int x;
cout << array1 << endl;
reverseArray(array1, size);
cin >> x;
}//end main
void reverseArray(int array1[5], int size) {//start function
//int temp;
//bool swap;
for(int count = 0; count < 4; count++)
{//start for
//int temp;
array1[count] = array1[size];
//array1[count] = temp;
--size;
}//end for
cout <<array1;
}//end function