#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
int main(int argc,char *argv)
{
FILE *fp = fopen("./a.out","a+b");
if(fp == NULL)
{
//
}
void *p = stdout;
stdout = fp;
printf("%s\r\n","输出重定向");
fclose(fp);
stdout = p;
printf("%s\r\n","finish");
return 0;
}