I'm practicing pointer and arrays. In the first source code the while loop works
and in the second source the while loop does not work. I don't understand why isn't pStart the same as pText?
Does it have anything to do with the fact that I already incremented pTexts in a for loop? in the second source.
I'm confused on why the first source code runs, while the second source doesn't.
To me these 2 while loops are equivalent. Please enlighten me on why this occurs.
That is because in your second code after the third for loop pTesxt no longer points to myarray[0] instead it points to myarray[2], if you reassingned pointer pText to point to myarray[0] again your code should work fine.
You dont need pointer pStart so replace it with : pText = myarray;