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
The thermal expansion or contraction of a given metal is a function of the f a)-density b)-initial temperature c)- temperature difference d)- linear coefficient of thermal expansion e)- final temperature f)- original length
Answers: 2
question
Engineering, 04.07.2019 18:10
Courses that are developed by subject matter experts, internal or extemal to the college or university. these programs are marketed by the school (clo2) marks a)-vocational schools b)-vendor training c)-colleges & universities d)-continuing education programs
Answers: 2
question
Engineering, 04.07.2019 18:20
Ahe-xe mixture containing a 0.75 mole fraction of helium is used for cooling electronics in an avionics application. at a temperature of 300 k and atmospheric pressure, calculate the mass fraction of helium and the mass density, molar concentration and molecular weight of the mixture. if the cooling capacity is 10 l, what is the mass of the coolant?
Answers: 3
question
Engineering, 04.07.2019 18:20
Apiston-cylinder device contains 0.1 m3 of liquid water and 0.9 m3 of water vapor in equilibrium at 800 kpa. heat is transferred at constant pressure until the temperature of water reaches 350 °c. determine (a) the quality of water at the initial state (b) the work associated with this process, (c) the heat associated with this process.
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, 04.01.2021 14:00
question
English, 04.01.2021 14:00
question
Mathematics, 04.01.2021 14:00
question
Mathematics, 04.01.2021 14:00
question
English, 04.01.2021 14:00
question
Mathematics, 04.01.2021 14:00
Questions on the website: 13722360