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
Afluid flows with a velocity field given by v=(x/t)i.. determine the local and convective accelerations when x=3 and t=1.
Answers: 2
question
Engineering, 04.07.2019 18:20
Aheavily insulated piston-cylinder device contains 0.02 m3 of steam at 300 kpa and 200 °c. 1.2 mpa. d this process. team is now compressed in a reversible manner to a pressure of etermine the entropy change and the work done on the steam during this process
Answers: 1
question
Engineering, 04.07.2019 19:10
Arigid tank contains 10 kg of air at 137 kpa (abs) and 21°c. more air is added to the tank until the pressure and temperature rise to 242 kpa (abs) and 32°c, respectively. determine the amount of air added to the tank. [r-0.287 kj/kg k]
Answers: 3
question
Engineering, 04.07.2019 19:20
Liquid flows at steady state at a rate of 2 lb/'s through a pump, which operates to raise the elevation of the liquid 100 ft from control volume inlet to exit. the liquid specific enthalpy at the inlet is 40.09 btu/lb and at the exit is 40.94 btub. the pump requires 3 btu/s of power to operate. if kinetic energy effects are negligible and gravitational acceleration is 32.174 tt/s, the heat transfer rate associated with this steady state process is most closely 1)-2,02 btu/s from the liquid to the surroundings 2)-3.98 btu/s from the surroundings to the liquid. 3)-4.96 btu/s from the surroundings to the liquid. 4)-1.04 btu/s from the liquid to the surroundings.
Answers: 2
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, 21.11.2020 01:00
question
Biology, 21.11.2020 01:00
question
Mathematics, 21.11.2020 01:00
question
Mathematics, 21.11.2020 01:00
question
Computers and Technology, 21.11.2020 01:00
question
English, 21.11.2020 01:00
Questions on the website: 13722361