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]
4 years ago
14

Declare a structure with a type name: Car containing:

Computers and Technology
1 answer:
OLga [1]4 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
Three materials needed to stream video video content
PIT_PIT [208]
Oh yeah yeah I don’t know ‍♂️ is
8 0
3 years ago
Read 2 more answers
Please help! i need this very quickly
Savatey [412]
Edit the shape to be merged
5 0
3 years ago
Read 2 more answers
Which of the following is NOT a project management cause of failed projects? (Points : 2) Shortcuts taken during the project
muminat

Answer:

Inadequate analysis of system and the design

Explanation:

Some of the causes of failed project in project management are as follows:

  • Deficient hazard the executives.
  • Inadequately characterized task scope.  
  • Inability to recognize key presumptions.  
  • Undertaking administrators who need involvement and preparing.
  • Absence of powerful correspondence at all levels.
  • No utilization of formal techniques and procedures.  
  • Overrun of the budget

8 0
4 years ago
The working window of a presentation is the _____.
stepan [7]
The answer would be slide
8 0
4 years ago
Read 2 more answers
Give me 3 companies that utilize audio/video technology
mestny [16]

Answer: I think Harman International. Bose.

Sennheiser, that ultilize audio And Zendesk

New Relic That ultilize video technology.

Explanation:

3 0
4 years ago
Other questions:
  • If you value achievement, which of the following is important to you?
    7·2 answers
  • What is the purpose of system calls, and how do system calls relate to the OS and to the concept of dual-mode (kernel-mode and u
    14·1 answer
  • Jennifer frequently uses a few programs on her laptop. Where will she find all the frequently used program icons in her computer
    13·1 answer
  • A user is troubleshooting a mobile device app that is displaying errors and has contacted the app manufacturer’s technical suppo
    14·1 answer
  • Jerry is having trouble finding the information that he needs from his search results. Which technique would you suggest he use
    14·2 answers
  • John travels a lot and he needs to access his documents and services on the go. Which of these technologies allows his to access
    5·1 answer
  • What types of storage can be used to access your data on another computer
    5·1 answer
  • Complete the code to finish this program to analyze the inventory for a store that sells purses and backpacks.
    7·1 answer
  • __________ is a software-enabled technique that can change the hardcoded mac address to any mac address and thus overcome mac ad
    8·1 answer
  • What would the theoretical variance (square of the standard deviation) of the following random values be? rand(Normal(80, 10), 2
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!