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
In Microsoft Windows, which of the following typically happens by default when a file is "double-clicked"
Elenna [48]
Depending on the type of file, it normally runs or opens.
4 0
3 years ago
Read 2 more answers
Que Inventos Importantes se Crearon durante la edad de agua y viento
ss7ja [257]

Answer:

Sep 24, 2016 · Que inventos importantes se crearon durante la edad del agua y el viento Recibe ahora mismo las respuestas que necesitas!

Explanation:

3 0
3 years ago
The association between a UCS and a CS can be extended to include more stimuli (more stimuli related to the CS can elicit the CR
almond37 [142]

Answer:

The answer is Stimulus generalization

Explanation:

Stimulus generalization is an example of classical condition. Classical conditioning takes a stimulus that does not cause a particular response (neutral stimulus) and then pairs it repeatedly with an unconditioned stimulus that will cause an unconditioned response. In the case of Stimulus generalization, I will give an example of a subject presenting food to a dog once they ring a bell. Lets say that you have taught a dog to salivate every time it hears a bell ring. If you took another bell that has a similar sound and rang it, the dog would still salivate and come pick its food. This is a perfect example of Stimulus generalization. The dog has responded to a new stimulus as if it was the initial conditioned stimulus.

5 0
3 years ago
What happens when a user clicks Accept on a meeting request?
melomori [17]

Explanation:

Other events at that time are canceled, and the meeting cannot be canceled by the organizer.

The agenda is updated with the user’s contact information, and other events at that time are canceled.

The meeting cannot be canceled by the organizer, and the agenda is updated with the user’s contact information.

The meeting organizer is notified, and a copy of the meeting is added to the user’s Outlook calendar.

3 0
3 years ago
Read 2 more answers
Given an int variable k that has already been declared, use a while loop to print a single line consisting of 88 asterisks. Use
Grace [21]

Answer:

True

Explanation:

The while loop is going to be executed until the condition is false.

Since <em>k</em> is initially equal to 1, the loop will execute 88 times. One asterisk will be printed and <em>k</em> will be incremented by one during each iteration.

When <em>k</em> becomes 89, the condition will be false (89 is not smaller or equal to 88) and the loop will stop.

6 0
3 years ago
Other questions:
  • How will a packet tracer environment be affected if a heater is added to a container named branch office and turned on?
    5·1 answer
  • What is the full meaning of ICT
    14·2 answers
  • A colleague asks you to research a CPU for a new server that will run Windows Server 2019. He explains the server roles that he
    7·1 answer
  • What type of device does a computer turn to first when attempting to make contact with a host with a known IP address on another
    9·2 answers
  • Which of the following is NOT contained on the Slide Show toolbar?
    11·2 answers
  • Your task is to write a C program that measures the latencies of various system calls. In particular, you want to know 1) the co
    5·1 answer
  • 8.7 Code Practice: Question 2 edhesive
    14·2 answers
  • Help me guys plssssss​
    10·1 answer
  • Many web pages use a <br> structure to define an area of focus
    13·1 answer
  • True or False? Security code is almost always open source!<br> True<br> False
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!