Copy input to output with getchar() and putchar() - C Data Type

C examples for Data Type:char

Description

Copy input to output with getchar() and putchar()

Demo Code

#include <stdio.h>  

 int main()  //from w  ww  . jav  a2s . co  m
 {  
     int c;  

     while ((c = getchar()) != EOF)  {
         putchar(c);  
     }
     
 }  

Result


Related Tutorials