The purpose of these practices is to, well, practice your programming skills. Some of them are very easy, and others can be a little challenging. These are highly recommended as an additional way to improve your programming skills.
IMPORTANT:
Normally, output (e.g. printf) sends its output to the screen. To send it to a file instead, use the greater-than (>) symbol:
Any output from myprogram will go to a file named out.txt and you will see nothing on the screen.myprogram > out.txt
Normally, input (e.g. scanf) is read from the keyboard. To have the program read input from a file instead, use the less-than (<) symbol:
All input to myprogram is read from in.txt, and the keyboard is ignored. Also, none of the characters that are in the file will show on the screen.myprogram < in.txt
You can redirect both input and output at the same time like this:
myprogram < in.txt > out.txt
Name Main topics 1. squares1 Looping 2. squares2 Looping 3. squares3 Looping 4. numdigits Looping, operators 5. sumdigits Looping, operators 6. dice1 Looping, random numbers 7. num2words Conditionals using if and/or switch 8. scrabble1 Conditionals using switch 9. bsort Looping, arrays, sorting 10. anagram Looping, arrays 11. reversewords Strings, looping, pointers 12. slots1 Looping, conditionals, random numbers 13. coins Nested loops, conditionals 14. fileconv File I/O, looping, conditionals 15. commatize Strings, pointers, looping 16. inttostr Arrays, looping 17. strtoint Strings, looping 18. wordlen Strings, pointers, looping 19. encoder File I/O 20. fractions Structures 21. replacestr File I/O, pointers, strings 22. proper File I/O, pointers, strings 23. stripcom File I/O, pointers, strings 24. randwalk 2D arrays, random numbers 25. magic 2D arrays