int i;FILE* file;if ((file = fopen ("D:\\q.txt","w+" )) == NULL)//打开操作不成功{printf("The file can not be opened.\n");exit(1);//结束程序的执行}printf("The result are as follows:\n");for (i = 0; i < 4410; i++){printf("%lf", y[i].real);//if (y[i].img >= 0.0001)printf("+%lfj\n", y[i].img);//else if (fabs(y[i].img) < 0.0001)printf("\n");//else printf("%lfj\n", y[i].img);fprintf(file, "%f,", y[i].real);}fclose(file);
