Question: 10 pts) Write the following C function void reverse (char *str, int length) This recursive function should take a string str that as length characters.

10 pts) Write the following C function void reverse (char *str, int length) This recursive function should take a string str that as length characters. When the function ends, str should hold its everse. For example, if str is originally "abc", then it should hold the alue "cba" at the end of the function. onsider the following questions about structures. a)(5 Points) Declare a struct called song that stores a song's title, rtist, year, genre, and the cost (of either a CD or a tape). Use n enum to store the genre, which can be either Rock, Pop, Country, or ldies. Use a union to allow the cost to be for either a CD or tape. Use n additional enumeration to keep track of what media type the cost is or. 2 Points) Declare the variable songPtr that points to g structure. Also, allocate memory for the structure. 3 Points) Initialize the structure pointed to by songPtr to have the title ed", the artist Aerosmith", the release year 2001, the genre Rock, and ost to $17.99 for a CD. Don't forget to set the enumeration variables 0 pts) Consider the NODE structure below. Suppose we know the following: We have already declared variables: NODE head; NODE *curnode ; The head variable points to the beginning of a linked list of nodes The list is not empty
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
