Purchase Solution

Test line in C

Not what you're looking for?

Ask Custom Question

TestLineNumbering that accepts one command-line argument, the name of the file. Your code should verify that a single command-line argument was specified.
Declare a variable that holds a File object which is initialized from the file named in the first command-line argument.
Within a try-catch block, create:
- a buffered, input stream reader based on the System.in stream (Standard input).
- a print file writer based on the File reference.
- a while loop that reads each line from the console input stream and prints the line out to the file prepended with the count of the line number.
Close the I/O streams.

Purchase this Solution

Solution Summary

This solution provides a sample of the included programming assignment.

Purchase this Solution


Free BrainMass Quizzes
Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Javscript Basics

Quiz on basics of javascript programming language.