September 8th, 2012, 04:40 AM
Originally Posted by q1cet0o
Is this all that must be displayed?
No. If you think that you are doomed as far as any examination is concerned. Most examinations occur at the end of a course of lessons - how come you have got to the examination without the lessons!?
Read the code, or just follow the instructions. The message output is telling you how to run the code. It is obviously
asking you to provide a filename and a character as command line arguments. That is not a programming issue, that is a fundamental aspect of using a computer.
If you are running the code from the command line, you need to provide two arguments, e.g.:
find somefile.txt x
then if somefile.txt exists and contains a 'x' character, a "found" message will be output. If somefile.txt does not exist, the "cannot open" message will be output.
If you are running the code from some IDE, it will probably have a place in the project or debug configuration where you can add test arguments.