Hi,
I have declared:
Code:char c[] = "Good Morning"; char *pc = &c[2];The result I get is "od Morning"Code:cout << "pc is " << pc << endl;
Why does this happen? Can anyone explain how and why this happens?
And what the assignment statement for the pointer is doing.
What I expected...
I expected the output to be the address of the 3rd element of the array.
I was wrong.
Thanks!