Question
Write a program that will input letter grades (A, B, C, D, F), the number of which is input by the user (a maximum of
Write a program that will input letter grades (A, B, C, D, F), the number of which is input by the user (a maximum of 50 grades). The grades will be read into an array. A function will be called five times (once for each letter grade) and will return the total number of grades in that category. The input to the function will include the array, number of elements in the array and the letter category (A, B, C, D or F). The program will print the number of grades that are A, B, etc.
please use C coding.
2. please use C coding.
Write a program with the following behavior. First, it asks you how many words you wish to enter. Then it has you enter the words, and then it displays the words.
Use malloc() and the answer to the first question (the number of words) to create a dynamic array of the corresponding number of pointers-to-char. (Note that because each element in the array is a pointer-to-char, the pointer used to store the return value of malloc() should be a pointer-to-a-pointer-to-char.) When reading the string, the program should read the word into a temporary array of char, use malloc() to allocate enough storage to hold the word, and store the address in the array of char pointers. Then it should copy the word from the temporary array into the allocated storage. Thus, you wind up with an array of character pointers, each pointing to an object of the precise size needed to store the particular word.
A sample run could look like this:
How many words do you wish to enter? 5
Enter 5 words now: I enjoyed doing this exercise
Here are your words:
I
enjoyed
doing
this
please use C coding.
Sample Run: Please input the number of grades to be read in. (1-50) A11 grades must be upper case A B C D or F Input a grade Input a grade Input a grade Input a grade Input a grade Input a grade Number of A-2 Number of B-2 Number of C-1 Number of D-1 Number of F-0Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started