c - Loading columns from file -
I have just begun and I have to write a program that reads a column from a file. I have to throw What was doing was to write. I do not know what to do in the column. And only one has to choose what to do with the size of the array.
#define _CRT_SECURE_NO_WARNINGS #include. & Lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; Int main () {FILE * pr; Four FNN [100]; Int i, n; Four Tabilica [100] [100]; Printf ("file name \ n"); Scanf ("% s", and fname); Public relations = FOPAN (FNN, "R"); If (public relations == faucet) {printf ("Can not load file \ n"); Exit (-1); } Printf ("column number \ n"); Scanf ("% d", & amp; i); If (i == faucet) {printf ("no column"); }} Fclose (public relations);} (FIFF (PR) (F.F.C.F.F. (PR, "% s", and tabilica [ii]); printf ("% s \ n", tableclick [i] After the code>
the file is being loaded as scanf ("% s" , & Amp; Fname); reads a file name to address the address fname which is incorrect < / P>
Comments
Post a Comment