Quantcast
Channel: User Peter - Reinstate Monica - Stack Overflow
Viewing all articles
Browse latest Browse all 223

Comment by Peter - Reinstate Monica on Reading a newline

$
0
0
If you must reproduce the line breaks you must read line-wise, probably with fgets. (The usual problem of "max line length" exists (hopefully, your assignment specifies one).) You can then read the line in the buffer which you have read with fgets using sscanf, using the n specifier to keep track of the read position in the string.

Viewing all articles
Browse latest Browse all 223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>