Programming Exercises

  1. Modify Listing 13.1 so that it solicits the user to enter the filename and reads the user's response instead of using command-line arguments.

  2. Write a file copy program that takes the original filename and the copy file from the command line. Use standard I/O and the binary mode, if possible.

  3. Write a file copy program that prompts the user to enter the name of a text file to act as source file and the name of an output file. The program should use the toupper() function from ctype.h to convert all text to uppercase as its written to the output file. Use standard I/O and the test mode.

  4. Write a program that sequentially displays onscreen all the files listed in the command line. Use argc to control a loop.

  5. Modify the program in ...

Get C Primer Plus, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.