subject
Engineering, 26.02.2020 01:23 ArielA13

Write a C program that is given a file name as a command line argument. Open the file and read it. At the end of the file, print out: LINES: lc WORDS: wc CHARS: cc DIGITS: dc Where lc is the number of lines, wc is the number of words, cc is the number of characters, and dc is the number of digit characters, 0-9. If no file name is provided, the program should use the standard input instead of a file. If the file cannot be opened, print "CANNOT OPEN " followed by a space and the filename, and stop. The program should ignore any extra command line arguments that are provided after the file name.

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 18:10
An air conditioning system consist of a 5 cm diameter pipe, operating at a pressure of 200 kpa. the air initially enters the pipe at 15°c with a velocity of 20 m/s and relative humidity of 80%. if the heat supply throughout the process is 960 w, determine the relative humidity and the temperature at the outlet
Answers: 3
question
Engineering, 04.07.2019 18:10
Water at 70°f and streams enter the mixing chamber at the same mass flow rate, determine the temperature and the quality of the exiting stream. 0 psia is heated in a chamber by mixing it with saturated water vapor at 20 psia. if both streams enters the mixing chamber at the same mass flow rate, determine the temperature and the quality of the existing system.
Answers: 2
question
Engineering, 06.07.2019 03:20
Areaction-bonded silicon nitride ceramic has a strength of 250 mpa and a fracture toughness of 3.4 mpa(m)^1/2, what is the largest-sized internal flaw that this material can support without fracturing? (use y -1 in the fracture-toughness equation.)
Answers: 3
question
Engineering, 06.07.2019 04:20
Explain the similarities and differences in the design guidelines for turning and for
Answers: 1
You know the right answer?
Write a C program that is given a file name as a command line argument. Open the file and read it. A...
Questions
question
Mathematics, 18.10.2020 04:01
question
Physics, 18.10.2020 04:01
question
English, 18.10.2020 04:01
Questions on the website: 13722360