Here p is a pointer to array of strings which means it stores the address of array elements . but here p+=6 does exactly what ? i am not able to get that therefore having problem in getting the correct output?
What does the meaning of p+=6 means here and what it will do?
@ritik_99 p+=6 is the shortcut for wrinting p = p+6 . As p points to the first element of the array, if we add 6 to it will then point to the element with the index 6. In short, if we write p+=n, that means we are adding the value n to p and p will now be pointing to the element with index n.
Hope this helps.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.