1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
konstantin123 [22]
3 years ago
14

Declare a structure with a type name: Car containing:

Computers and Technology
1 answer:
OLga [1]3 years ago
7 0

Answer:

C++ code is given below

Explanation:

#include <iostream>

#include <cctype>

#include <string.h>

#include <cstring>

#include <sstream>

using namespace std;

struct Car {

public:    

char reportingMark[5];    

int carNumber;

string kind;

bool loaded;

string destination;

};

void input(Car *);

void output(Car *);

int main() {

Car *T = new Car;    

input(T);

output(T);    

delete T;    

return 0;

}

void input(Car *T)

{

string str, s;

cout << " Enter the reporting mark as a 5 or less character uppercase string: ";

cin >> str;

for (int i = 0; i < str.length(); i++)

T->reportingMark[i] = toupper(str[i]);

cout << " Enter the car number: ";

cin >> T->carNumber;

cout << " Enter the kind: ";

cin >> T->kind;

cout << " Enter the loaded status as true or false: ";

cin >> s;    

istringstream(s) >> boolalpha >> T->loaded;    

if (T->loaded == true) {

cout << " Enter the destination: ";

cin.ignore();

getline(cin, T->destination);

}

else

T->destination = "NONE";    

}

void output(Car *T)

{

cout << " Reporting Mark: " << T->reportingMark;

cout << " Car Number: " << T->carNumber;    

cout << " Kind: " << T->kind;

cout << " Loaded Status: " << boolalpha << T->loaded;

cout << " Destination: " << T->destination << " ";

}

You might be interested in
Who made the first electronic device?
emmasim [6.3K]
Joseph Henry in about 1835. He is American and he made something called a relay.
6 0
2 years ago
What is the main advantage of Ram<br><br>​
andre [41]

Answer:

to get milk

Explanation:

gjvuvuvjvvjvjvvjvjvhvjvub

7 0
3 years ago
The GaVS resource where students can locate information regarding Canvas, student email, registration and O365 is called the: St
wariber [46]

I Inferred you are referring to the Georgia Virtual School resource program.

<u>Answer:</u>

<u>Guidance Center</u>

<u>Explanation:</u>

Interestingly, the Georgia Virtual School (GaVS) enables students access to Virtual education.

Their resource platform allows students to find information regarding Canvas, student email, registration and Office 365 etc by simply going Guidance Center.

7 0
3 years ago
The calculation of GDP is the sum of: Consumption, Investment, Government Spending, and Net Exports. What is the simple formula
12345 [234]
The correct answer is B
3 0
3 years ago
When recording a song on her laptop, Sarah noticed a slight delay in what she could hear on her headphone and what she was recor
PolarNik [594]

Answer:

latency

Explanation:

We could have latency if we want to record with a computer, and then we try to hear that record with the headphone.

This is an audio card's characteristic, this is a time between the input, in this case, Sarah recording, and the output Sarah's headphone.

The computer needs time to process the signal, and for that there is latency, but this depends on more of the operative system and the CPU in your computer than the audio card.

6 0
3 years ago
Other questions:
  • suppose you need to verify how to correctly use commas. you pen your English textbook and scan the chapter titles in which one w
    15·1 answer
  • considering that two variables counters and accumulators are important in loop design. What would be their purpose?
    9·1 answer
  • About n processes are time-sharing the CPU, each requiring T ms of CPU time to complete. The context switching overhead is S ms.
    12·1 answer
  • Given an object context for an Entity Data Model named mmaBooks, which of the following statements would you use to add a Custom
    15·1 answer
  • Are the actions legal or illegal?
    13·1 answer
  • A broker statement is an example of an ___ record
    12·2 answers
  • Name a piece of software you often use where it is easy to produce an error. Explain ways you could improve the interface to bet
    5·1 answer
  • Why security must be planned, tested, and ready by the time the erp implementation is at go-live?
    11·1 answer
  • I re-made the human version of Daddy Dearest from Friday Night Funkin
    14·2 answers
  • Question 1 (1 point)
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!