I have the following piece of code
Why do we use ch here?Code:for(i=0;(ch=getchar())!='\n';i++) s[i]=ch;
Why can't we use array directly?
Is it some kind of programming practice?
I have the following piece of code
Why do we use ch here?Code:for(i=0;(ch=getchar())!='\n';i++) s[i]=ch;
Why can't we use array directly?
Is it some kind of programming practice?
Last edited by syamprasadkr; 03-04-2013 at 07:33 PM.