#include
int main()
{
int i,k;
for(k=1;k<=10;k++)
{
i=getchar();
putchaar(i);
return 0;
}
//my doubt is…Why loop is executing 5 times instead of 10…
#include
int main()
{
int i,k;
for(k=1;k<=10;k++)
{
i=getchar();
putchaar(i);
return 0;
}
//my doubt is…Why loop is executing 5 times instead of 10…
EmbLogic Research & Competency Development Labs
Phone: +91 9818467776, 8527567776, 9650467776
Email: info@emblogic.com
Copyright © EmbLogic Embedded Technologies Pvt. Ltd.
the thing is that when u enter any character via terminal you press another character along with it .i.e ‘\n’..so at one time it takes two characters hence it works five times only.
thanks.. now its working..