#include <iostream>
int main()
{
char myName[]{ "Alex" }; // fixed array
std::cout << myName << '\n';
return 0;
}
The output of the above code is: Alex
On the other hand, the output of the following code
int main()
{
int array []{ 9, 7, 5, 3, 1 };
std::cout << array << '\n'; // print memory address of array pointer
}
is: 0x7ffdf3e66f50 I understand both and then was confused at the same time. So I need more clarifications.