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 displays the number of
names that are 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’ve read
all the strings from the file, the counter variable will contain the number of names
stored in the file.)
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here