I am studying a course of OOP but I'm new to C++. My instructor introduced us to character array in C++. He said that to get base address of a character array in C++ one can use either of the following:
char* a = "Test String";
cout << &a; // Prints base address of char array
or
char* a = "Test String";
cout << (int*)a;
but when I tried both for same char array I got different results. What is difference between both?