/** * Simple example of writing to a file using fprintf * @author gtowell * Created:April 2021 * **/ #include int main(int argc, char const *argv[]) { int a = 5; double b = 10.854897548357; FILE *fp = fopen("lab18a", "w"); fprintf(fp, "%4d %12.8f\n", a, b); fclose(fp); return 0; }