I understand how this program shows how getchar is using buffer to copy and paste more than one character
#include <stdio.h>
main()
{
int c;
c=getchar();
putchar(c);
c=getchar();
putchar(c);
}
but how does this code below
#include <stdio.h>
main()
{
int c;
c=getchar();
while (c!= EOF) // how does this program copy 12 and output 12. is a
{ buffer being used? How so?
putchar(c);
c=getchar();
}
}
show a buffer being used... i dont get it and i dont see how its able to print 12 when i input 12. im new to C