Help with pointers

closed account (3qD2y60M)
Hi everyone, I was reading a c++ code and I saw this:
#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
char cTmp[] = "Hello There";
char *p = cTmp;

for( ;*p; p++ ){
cout << *p;}

cout << "\n\n\n\n";

cin >> cTmp;


return 0;
}

I will appreciate if someone can help me understand how/why this code works.

Thanks
You have asked this already.

http://www.cplusplus.com/forum/general/147425/
closed account (3qD2y60M)
But I have got no help. That's why I asked here too.
I think the reason you get no help is because it looks like it could be a homework question and we are not here to do people's homework. If you ask more specific questions that shows you are at least trying you are more likely to get help. So ... What parts exactly are you having trouble with?
closed account (3qD2y60M)
As I mentioned it is not a homework. It was part a question while In a chapter about pointers. Thank you for questioning me. I thought the website is a very god source of someone like me wants to learn on his own.
I appreciate your help
Topic archived. No new replies allowed.