I'm new to the C language and I'm getting aquanted with pointers. So, I don't get how we get the WHOLE string by pointer. If the pointer contains the address of just the first character in the string, how does it return the whole string?
Let's say we have something like this char *s = "Test";
And because it's just an array of chars it lies somewhere in memory like this:
The string: T e s t \0
The addresses: 100 101 102 103 104
So, *s would hold 100 (the address of the first character T), if I get it right.
Then why when we do printf(s); do we get the whole string Test in our output?
Does it scan addresses until it meets \0, or does it do something else?