Assume that a file containing a series of names as strings


Item Counter.

Assume that a file containing a series of names (as strings) is named names.dat and exists on the computer's disk. Design a program that stores the number of names stored in the file. (Hint: open the file and read every string stored in it.

Each time you read a string, increment a counter variable. When you have read all the strings from the file, the counter variable will contain the number of names stored in the file.)

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Assume that a file containing a series of names as strings
Reference No:- TGS02313931

Now Priced at $20 (50% Discount)

Recommended (99%)

Rated (4.3/5)