- Due: Wednesday, June 2nd no later than 1:35pm.
- Submission instructions: push a commit with the tag
classwork12to your git repository.
- Deadline reminder: after the deadline passes, you cannot earn any points for this assignment. If the deadline is approaching, submit what you have in order to earn partial credit.
- Practice solving a problem using recursion.
Write a program called
classwork12.c that uses recursion to count the number of letters in a word that the user inputs. You can assume that the word will be no more than 20 characters long.
Enter a word (max length 20 characters)> Bozeman Length is 7
Optional: ask the user for a maximum number of expected letters and allocate space for your string dynamically. Before ending your program, use
free to free the space used by your string. In this case, interaction with the user might look like:
Enter a max word length> 20 Enter a word no more than 20 characters> Bozeman Length is 7
Grading - 10 points
- 1 point - there is a file called
- The file compiles and runs.
- Note: you will not earn any points if your work is not committed and pushed to Github with the tag
This classwork will be graded with scores in Brightspace by 5pm the day it is due (June 2nd).