Quote Originally Posted by helma View Post
Can someone enligten me on what below program does?
I understand getchar and putchar.. but what is this program suppose to do?
I try to put printf on it, but it shows nothing..

can someone explain to me what this program is suppose to do?
It is reading something and assigning to c?

so, if I do, ./a.out filename , will it assign entire filename's content into c?

#include <stdio.h>

/* copy input to output; *st version */

main()
{
int c;

c = getchar();
while (c != EOF) {
putchar(c);
c = getchar();
}
}
-----------------
[url=http://www.keywordspy.com/keyword-research-tool]Keyword Research[/url]
[url=http://www.freebeautymakeover.com]Free Plastics Surgery[/url]
hmm... that's a bit of a strange code there... course than again I dont code...:|