Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

subject: data structure and algorithm
Use C++
image text in transcribed
here the picture image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

Understand why empowerment is so important in many frontline jobs.

Answered: 1 week ago

Question

What is DDL?

Answered: 1 week ago