Pointers holding something other than an adress? [C]
<p>I've been studying C for a few months at university now, but I missed a lecture about pointers, so I tried to make up for it by studying it online and I thought I got it - but something I just stumbled upon is extremely irritating for me.</p>

<p>I know that pointers hold nothing more than the address they are pointing to - for example, if I understood everything correctly so far, I have:</p>

<pre><code>int *pointer;
int number = 30;
pointer = &amp;number;
printf("Number at location: %d", *pointer);
</code></pre>

<p>And this works fine, as it should. I assign the adress of the variable number to pointer and then print it in the end by dereferencing pointer and getting the actual value from the adress. What irritates me though are char pointers.</p>

<p>I've read up on string arrays/pointers, so I tried a few things, when I noticed that something strange (for my eyes at least) happened, with int pointers too:</p>

<pre><code>char* pointer;
char array[] = "Dingleberry";
pointer = array;
printf("%s\n", pointer);
return 0;
</code></pre>

<p>I know that I am not directly assigning the adress, but if I remember correctly, with arrays, that's not necessary in conjunction with pointers - anyway - this code here works as expected, it prints out "Dingleberry". My problem now is... why? Shouldn't the pointer, without dereferencing, only hold the address of the value? If I would dereference here, the program crashes, it does show the address if I use the &amp; though. </p>

<p>I'm not getting any warnings whatsoever when compiling. Also, shouldn't it work if I were to use:</p>

<pre><code>printf("%c", pointer); 
</code></pre>

<p>to only get one letter? (I mean, trying this does show a warning - but I'm interested in getting better and ruling out most likely stupid misconceptions on my part.)</p>