Question: Can somebody answer this? 118 Numbered Musical Notation In numbered musical notation, notes are represented by integers between 1 and 7 inclusive. In C (the

 Can somebody answer this? 118 Numbered Musical Notation In numbered musical

Can somebody answer this?

118 Numbered Musical Notation In numbered musical notation, notes are represented by integers between 1 and 7 inclusive. In C (the key, not the programming language), the number and note correlation is as shown: Note: D E F B Number : 1 2 3 4 5 6 7 G In the code below, an array of chars is used to represent a musical score -- each element is one of the seven notes ('C', 'D', 'E', 'F', 'G', 'A', or 'B'). Your task is to complete a function print_numbered () which takes a char array and prints its equivalent in numbered musical notation. Each note / integer should be separated by a space. You may assume that your function will only be called on scores in the key of C (i.e. D should always be converted to 2, F should always be converted to 5, etc.) Examples Input: print_numbered (5, {'C', 'D', 'E', 'F', 'C'}) Output: 1 2 3 4 1 Input: print_numbered(3, {'A', 'B', 'C'}) Output: 671 1 Winclude 2 #include 3 4 // Function prototype: 5 void print_numbered (int size, char *score); 6 7 8 int main(int argc, char **argv) { // Variable declarations (assigned hidden values): int score_size; char new_score[score_size]; 9 10 11 12 13 14 15 // Function call: print_numbered( score_size, new_score); return 0; 16 } 17 18 void print_numbered (int size, char *score) { 19

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!