O'Reilly logo

C Primer Plus, Fourth Edition by Stephen Prata

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required