0

When I write the code

int main(){
    char c = 'a';
    char *p = &c;
    cout<<*p<<" "<<&c<<" "<<p<<" ";

    return 0;
}

The output is

a aa aa

Why this behaviour only in case of char when other datatype returns the address? And y an extra a appended with the char content?

sara
  • 71
  • 6

0 Answers0