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
Identify the most appropriate way to display the following research data.
VMariaS [17]

Answer:

1. Artwork of the child participants can be displayed as Picture.

Explanation:

The Art work is painting and filling different colors in different images and objects. Child make different pictures of homes, objects, fruits and vegetables and then colored them accordingly. This type of art work is displayed as picture. This work could not be displayed in the form of tables and lists and also could not shown as graphics.

Answer:

2. The changing image of public transportation is displayed as Graphics.

Explanation:

In Graphics, different images has been designed on different tools by graphic designers to display some problem and its solution in visuals. Different tools are there to make visuals. Changing image of bus transportation is also a transition from old transport system to new transportation system. So, it should displayed in the form of graphics.

Answer:

Illustrative comparison of data from the year 2010-2013 can be displayed in the form of word tables and lists.

Explanation:

In tables and list different data has been placed in specific order for the purpose of analysis of data. These tables are also designed to compare different values and things. So, the data from the year 2010-2013 can be displayed in the form of tables and list so that it can be compared and analyze from different aspects.

7 0
3 years ago
Your location has been assigned the 172.149.254.0 /24 network. You are tasked with dividing the network into 13 subnets with the
ira [324]
  • The subnet mask would be a 32-bit integer which is formed by assigning the host bits to all 0's and the networking bits to so many 1's.
  • In this method, the subnetting separates the IP address between host and network addresses.
  • The subnet mask covers an IP address with its 32-bit number, thus the term "mask".

Given:

Network IP address \bold{= 172.149.254.0 /24}

Subnet numbers \bold{= 13}

Calculating the borrow bits:

\to  \bold{= ceil(\log_{2} 13) = 4 \ bits}

a)

Calculating the dotted decimal value for the subnet mask:

\to \bold{11111111.11111111.11111111.00000000}\\\\\to \bold{255.255.255.240}\\\\

b)

The additional bits which will be needed to mask the subnet mask that is = 4.

Learn more: brainly.com/question/2254014

4 0
3 years ago
What type of machine is a hand drill?<br><br> A. Simple machine <br> B. Compound machine
Shalnov [3]
<span>It is a Compound machine.</span>
7 0
3 years ago
Read 2 more answers
Which class of fire extinguisher is appropriate for a fire involving electrical/energized electrical equipment?
krok68 [10]
The answer would be a C class fire extinguisher. 
6 0
2 years ago
Read 2 more answers
if a person walks 10 metres due to south in 10 seconds 10 due east in the next 10 seconds and transmitted you're not in the next
Scorpion4ik [409]

Answer:

\frac{1}{3}\ m/s

Explanation:

The computation of the velocity by using the following formula is

As we know that

Velocity = \frac{Displacement}{Total\ time\ taken}

where,

Displacement is 10 meters

Total time taken is 30 seconds

Now placing these values to the above formula

So, the velocity of Dash is

= \frac{10\ meters}{30\ seconds}

= \frac{1}{3}\ m/s

We simply applied the above formula so that we can get the velocity and the same is to be considered

5 0
2 years ago
Other questions:
  • What is the primary purpose for a screen saver in windows?
    8·1 answer
  • Information permanently stored on a hard disk, diskette, cd-rom disk, or tape, is called ________ storage.
    8·1 answer
  • The _____ contains a series of sections designed to prepare students for the ACT
    14·2 answers
  • How can you clean out the scales in an electric iron without taking the iron apart? A. By rinsing the tank and holes with a wate
    12·2 answers
  • Public static String doSomething(String s) { final String BLANK = " "; //BLANK contains a single space String str = ""; //empty
    6·1 answer
  • If you were doing a regular expression inside a Linux command line, which special character on the keyboard would give you two p
    13·1 answer
  • What can search the internet and select elements based on important words
    10·1 answer
  • Which of the following software maintenance steps erases gaps caused by deleting files from the hard drive?
    10·1 answer
  • 2. Kabel yang digunakan pada jangan wireline, sebagai
    14·1 answer
  • Which storage device is not recommended as a permanent storage solution?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!