code :
#include
using namespace std;
int main() {
char c = ‘a’;
char * p = &c;
cout<<p<<endl;
cout<<&c<<endl;
cout<<(void*)&c<<endl;
cout<<(int*)&c<<endl;
// cout<<"Sum of x+y = " << z;
return 0;
}
Output:
a?Ge��
a?Ge��
0x7ffec265473f
0x7ffec265473f
According to the explanation given in the video I should have got a as output after doing cout<<&c<<endl;
but I am getting some sets of character why this is so. please explain why I am getting all these characters