0
How does this work
7 Réponses
+ 2
Offset calculation
0 1 2 3 4 5 6 7 8 9 10 11
H e l l o w o r l d \0
Try to change 1 with another number, you'll understand how this works 👍
P.S. The '\0' is the null character used as string terminator in C-string a.k.a. char array.
+ 3
Vatsav substring works like this
Take a string and initailize it with "Hello"
If you write 1 it will print the while string except 1
+ 2
I think so the one is doing the work of substring function
+ 2
This is pointer arithmetic.
1 + pointer to a character (in your example, this pointer points to character 'H'.
1 means go to the next element.
+ 1
Ok got it thanks for helping
0
How does it actually work Atul