then it has to be printed to the screen 80 chars per line.
this is done in c.
My coding is super weak and don't know where to begin.
Any help is appreciated
then it has to be printed to the screen 80 chars per line.
this is done in c.
My coding is super weak and don't know where to begin.
Any help is appreciated
Copyright © 2021 Jogjafile Inc.
given the requirement of change upper case to lower case, will need:
for the
tolower()function andisalnum()function............
to input the characters from the file, and since each char needs to be processed, will need:
for the function:
getchar()and for the definition ofEOFand for the function:putc().............
To count the number of characters currently displayed on the current line, will need:
................
to know when to go to the next output line will need that number 80
.........
If the command line contains:
then will not need to open/close the file within the program.
...........
naturally, will need a
main()function with no parameters:.........
Since we will be reading a lot of characters, one at a time, will need:
The following
while()statement edited so can handle any input char.........
Since only displaying printable characters, will need a line like:
..........
Since displaying only in lower case will need a line like:
............
need to actually output the char, and track the length of the line
............
need to output a new line after 80 chars and reset counter
............
After the
EOFis encountered, will need to output a final newline so all characters are displayed............
That is really all there is to it.