#include <iostream>
int main ()
{
using std::cout;
char example1[] = "John";
int example2[] = {1,2,3,4};
cout << example1 << endl;
cout << example2 << endl;
}
The output of the program is as follows -
John
0x7fff50e079b0
Why is the first print statement returning the entire string and the second one just the address of the first element?