Wednesday 15 June 2011

c - Why doesn't my loop work? -


Why not the following code print the letters from one file at a time?

  file * fp; Int c; Fp = fopen ("/ tmp / input_file", "R"); While (c = getc (fp)! = EOF) {printf ("% c", c); } << Code>   

your c code = !! = operator = operator:

  while ((c = getc (fp))! = EOF) {   

No comments:

Post a Comment