Ejemplo de código fuente de ccopiar.c

Construído con funciones de la biblioteca estandar de C

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
/**
* @file ccopiar.c
* @author G.A.
* @date 21 Jan 2018
* @brief Simplified version of cat command (without arguments). The source code use the  C standard  library functions 
*
*/

#include <stdio.h>

int main(int argc, char *argv[])
{
    int c;

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

    return 0;
}