c - Using same array to store data repeatly -


I am reading data from a file word with the word and to store between each word in the same buffer with space I am trying. But the words are coming out of space without space. Please tell me what is wrong? AnaljiswalWikwikkumanini When I arrive in Kumarindia, I need a space between each word.

  int main () {four buff [200]; Int l = 0; File * FP; FD = Faucet; `` FP = FOPN ("Header C", "R"); Memset (buff, 0200); Whereas (1) {fscanf (FP, "% s", buff + l); L = strlen (fond); Printf ("word of string =% s \ n", buff); Printf ("length of string =% d \ n", l); If (FIF) {break; }} Fclose (fp); Return 0; }    

To ignore the fact that you are aware of the buffer overflow, Location can be added:

  fscanf (FP, "% s", buff + l); L = strlen (fond); Buff [l] = ''; L ++;    

Comments

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -