How we can make .DAT file in C | Sololearn: Learn to code for FREE!
0

How we can make .DAT file in C

I made a program in C. I want to plot it with gnuplot but I need the .dat file. As I ran the program I didn’t get any .dat file. I wonder how I can make the .dat file from my C program.

8th Jan 2019, 9:51 PM
saghi
2 Answers
+ 5
you can give .dat in file name Example : FILE *fptr; ptr = fopen ("filename.dat", "w");
9th Jan 2019, 2:47 AM
Misaka
Misaka - avatar
+ 2
There is a solution here https://stackoverflow.com/a/6934363
9th Jan 2019, 4:02 AM
Calviղ
Calviղ - avatar