Question: I'm studying pointers in C language with Ted Jensen's "A TUTORIAL ON POINTERS AND ARRAYS IN C" manual. It's a very prickly argument.

**Question 1**. I have come to program 3.1 and would like a clarification. This is the program:

```
#include <stdio.h> 
char strA[80] = "A string to be used for demonstration purposes";
char strB[80]; 
int main(void) { 
char *pA; 
char *pB;
puts(strA); 
pA = strA; 
puts(pA); 
pB = strB;
putchar('\n');
while(*pA != '\0')
{ 
*pB++ = *pA++; 
} 
*pB = '\0';
puts(strB);
return 0; 
}

```

Regarding the line `pA = strA;`, the book says "We then [point] the pointer pA at strA. That is, by means of the assignment statement we copy the address of strA [0] into our variable pA", which is what I don't understand.

To copy the address of `strA[0]` into our variable pA via the assignment declaration, shouldn't we write `pA = & strA`?

**Question 2**. The expression `c = * ++ p;` increases the value of `p` or the address of `p`?

Does the indirection operator (`*`) not indicate the value of the pointed variable?

Answer: 
> 
> To copy the address of strA [0] into our variable pA via the assignment declaration, shouldn't we write `pA = & strA`?
> 
> 
> 

`&strA` is the address of `strA`. `&strA[0]` is the address of `strA[0]`. These are the “same” in the sense they point to the same place in memory, but they have different types, and the compiler would complain if we wrote `pA = &strA` when the type of `pA` is a pointer to the type of the elements of `strA`.

When we write `pA = strA`, the array `strA` is automatically converted to a pointer to its first element, so `pA = strA` is equivalent to `pA = &strA[0]`.

> 
> Question 2: the expression `c = * ++ p;` increases the value of p or the address of p?
> 
> 
> 

The C grammar organizes this as `c = *(++p);`, and `++p` increases the value of `p`. If `p` is a pointer, it increases the value of that pointer. The `*` operator uses the increased value.

Be careful about speaking of the address of a pointer. The value of the pointer is an address, but you should not say that is the address of the pointer. The pointer is itself an object in memory, and so it has an address in memory where its value is stored. The address where a pointer is stored is different from the address stored in it. The “address of a pointer” is the address where the pointer is stored, not the value of the pointer.
In C, when you write :

```
char strA[80];

```

Memory is allocated for your table. This is an example for you to try and visualize what it looks like.

| [0] 1st Element | [1] 2nd Element | [2] 3rd Element | [....] .... | [n] nth Element |
| --- | --- | --- | --- | --- |
| 0000 | 0001 | 0002 | 0003 | n |

**strA** is a pointer to the address where your table starts in the memory (0000 in our example), which is the same as the address of its first element **strA[0]**.

So when you write

```
pA = strA

```

you are actually copying the first element's address (0000 in our example) to **pA**