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
Which phrase best describes a scenario in Excel 2016?
Airida [17]

Answer:

what are the phrases?

Explanation:

6 0
3 years ago
Henry has to create software that manages a database of all his clients of his firm. He wishes to run software on another comput
soldi70 [24.7K]

Answer:

The answer is B.

Explanation:

8 0
2 years ago
Read 2 more answers
Can anyone help my please
Makovka662 [10]

order: soil, plant seeds, water, seedling, corn plant

4 0
2 years ago
Read 2 more answers
What was ARPANET?
Anit [1.1K]

Answer:

The ARPANET was the first network that provided commercial internet services. And also it was the first network to make use of the TCP/IP protocols. However, you need to know that the first ISP or the internet service provider was the Telenet, and it was the first commercial version of the ARPANET which was introduced in the year 1974. And this service started its service for the customers in the year 1989.

Explanation:

Please check the answer section.

7 0
3 years ago
______ is data that is entered into a computer. ______ is the result produced by a computer.
Umnica [9.8K]
Input
Output
(Sorry for not being detailed)
5 0
3 years ago
Other questions:
  • In 2–3 sentences, describe how you would insert a table into a word-processing document.
    9·2 answers
  • An item such as a smart card is an example of the _______ form of authentication.
    10·1 answer
  • A collection of facts can be copyrighted, but only if the collection is ____ in a way that causes the resulting work to rise to
    14·1 answer
  • How can you tell the value of a purchase?
    7·1 answer
  • a marketing company is setting up a new office in the city. which type of contract should they sign for periodic maintenance of
    15·1 answer
  • Join zoom meet <br>id=547 458 9345<br>pw=sencHURI​
    8·2 answers
  • What helps you evaluate websites for reliable information?
    15·2 answers
  • Helpppppp me please cuz its due rn. put the correct word in the correct spot
    14·1 answer
  • What is 5 times 5 times 16 times 11 2345
    6·2 answers
  • ; This program replaces the value in R0 with its absolute value. ; ; It does NOT modify any other registers! ; .ORIG x0200 START
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!