I have this problem for CS. I'm using the code p3 = &s1[3];
however when I cout p3
it displays the value instead of the address. Is this to expected and the problem is right or is there something I am doing wrong?
Given the following declarations:
int i = 3, j, *p1 = &i, *p2; char s1[20] = "Wow, more pointers!", *p3;
Write a statement that makes
p3
equal to the address of the fourth element ofs1
.