While practicing with C++, I tried to display a char
variable's address with the &
operator, but I see a meaningless line of characters instead of a memory address.
Below is the complete program:
#include <iostream>
using namespace std;
int main()
{
char a;
a = 'a';
cout << &a;
}
Below is the output display I see:
I have tried to search online to find a solution and detailed information about this issue, but I couldn't find anything useful.