Question: subject: data structure and algorithm Use C++ here the picture 2. Study the program and its output, then answer the following questions. a. struct song
2. Study the program and its output, then answer the following questions. a. struct song is defined with two members. What are their names? b. Do the words char or float by themselves create new variables or allocate space in memory? c. Is a semicolon used at the end of the structure definition is compulsory? Remove the semicolon and run the program. Explain what happen when you run the program after you remove the semicolon. d. Since the definition of the structure doesn't create a new variable, what is the name of the variable declared using the struct Song data type? PN SAPWATI BF SEMAALL E ISMAL cCS20503 / DCS20303 / TCS21203 Lab Exercise 1 e. titlel is a structure variable that takes up space in memory. a. How many bytes allocated for this variable? b. How many parts does it have? What are their names? f. Show the contents of each member inside the box title1. 9. An array is a collection of many items of the same data type, such as int or char. Similarly, a structure data type is a collection of many items. Do they have to be of the same data type? h. When accessing a slot in an array, a set of brackets is used, such as a[2]=0;. When we want to access a member of a structure, what do we use? i. How would you have assigned the length member of title1 to 0 ? j. How would you have assigned the name member of title1 to "Baila Baila Baila ? Task 4 Refer to program in Figure 1 and do the following: 1. Run the program. Enter appropriate data as its input. Write the output of the program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
