9main (
int argc,
char *argv[])
14 for (i = 1; i < argc; i++)
16 int fd =
open (argv[i]);
19 printf (
"%s: open failed\n", argv[i]);
int main(int argc, char *argv[])
cat.c
int printf(const char *format,...)
Writes formatted output to the console.
int open(const char *file)
int write(int fd, const void *buffer, unsigned size)
int read(int fd, void *buffer, unsigned size)
#define EXIT_SUCCESS
Typical return values from main() and arguments to exit().
#define EXIT_FAILURE
Unsuccessful execution.