strings and arrays question

I don't understand the output of the code below.
what makes it that it outputs "el" ?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  #include <iostream>

using namespace std;


int main() {
    const char *s;   
    char str[]= "Hello ";   
    s = str;    // why does *s out puts H at this stage?
    while (*s) {       // I don't get this loop, does *s represent a number? what does it mean here?
        cout << *++s;  // pre incrediment for what purpose? I don't get incrediments with char. what is this? 
        *s++;
    }
    
   
	return 0;
}
Last edited on
Topic archived. No new replies allowed.