exercise 3
This commit is contained in:
22
gowrikumar/03-stdoutbuf.c
Normal file
22
gowrikumar/03-stdoutbuf.c
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* :author: Dan Buch (daniel.buch@gmail.com)
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
printf("(Hit ^C to stop the madness.)\n");
|
||||
while(1)
|
||||
{
|
||||
fprintf(stdout, "hello-out ");
|
||||
fprintf(stderr, "hello-err ");
|
||||
sleep(1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* vim:filetype=c:fileencoding=utf-8
|
||||
*/
|
Reference in New Issue
Block a user