First of all, you should not use a pointer unless you initialize it.
In the given code, you have just declared the pointer but not initialized it.
So when you'll access p (either as 'p' or 'p++') you will get memory location that is pointed by p, which in this case is random value...
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.