Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(2021) CSNB244 Programming 11 Lab 4 - Structure Student ID Student Name Instruction: Answer all questions. Write your answer to the table located on the

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
(2021) CSNB244 Programming 11 Lab 4 - Structure Student ID Student Name Instruction: Answer all questions. Write your answer to the table located on the final page of this document. Do not remove any pages. Activity 1: Basic Structures Given is a C++ program that consists of a structure name_Book. The value is pre-defined by the programmer #include using namespace std; struct _Beoki int id: string title: string author: int year: float price: int main() { structure Book booki; booki.id = 1; booki.title = "Learn C++ Programming"; booki.author = "Chand Miyan"; book1 year = 2015; booki.price = 99.9; cout using namespace std; struct Beski int id; string title: string author; int year: float price: 1; int maint structBook booki, book2; booki.id = 1; booki.title = "Learn C++ programming": booki.author = "Chand Miyan"; booki. year = 2015; booki.price = 99.9; book2.id = 2; book2.title = "Computer Organization and Architecture" book2.author = "william stallings": book2. year = 2019; book2.price = 79.9: cout #include using namespace std; struct Book int id; char title:40]; string author; float price; int main stzustin Book booki; cout > booki.id; cout > book1.price; sout > book1.price: cout using namespace std; struct Time int hour; int minute; int second; }; struct Date int day: int month; int year: strust Time time 1; int AL { struct _Date di sout > didas; Sout > Samanth sout > SURAT sent > Sevibus sout > SusBiTS sout > SubBlondi serut using namespace std; -ypedef struct _Time ! int hour; int minute; int second; IS typedef struct Date int day; int month; int year: Time OS Date: . -int mo! Date d; SRBT > desay: sout > Sath Sout > SEBE SRB > Se Jebeur; saat > SATOS:Theute sout > shsszesend; saat using namespace std; struct Best int id; char titis.140]; string author; int year; float price; void setRes Retatbalstruct _Book); strust _Book astBea Betarbed); int mabad { structure Book bookl; bookl = sebesspetata); setBeanstanta (bookl); Book ; return 0; } struct _Book ast Restbeta del struct Sout > x.id; sout > BOSS return x; void setges obstatalstruct Book newbegls) { SRBR

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 Processing

Authors: David M. Kroenke, David Auer

11th Edition

B003Y7CIBU, 978-0132302678

More Books

Students also viewed these Databases questions

Question

Name and describe five application controls.

Answered: 1 week ago

Question

What is topology? Explain with examples

Answered: 1 week ago