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
Which of the following is the correct order of the SDLC?
Anastasy [175]
I say when in doubt, go with c
3 0
3 years ago
Complete the sentence.
julsineya [31]

Answer:

An internal server error

5 0
3 years ago
Ashley is the record keeper for a bookshop. She gathers and maintains an organized collection of information. What is Ashley usi
maks197457 [2]

The answer is Database.

Reason being is because because the definition of database matches the statement.

- Collection of information that is organized so that it can be easily accessed, managed and updated. 

3 0
3 years ago
Read 2 more answers
. Briefly describe an SQL DML statement for storing new data into a table.
STatiana [176]

DML stands for Data Manipulation Language.

SQL DML statements consist of insert, update and delete statements.

Out of these three, insert is used to add new data to the table.

The update command modifies the existing data in the given table.

The delete command removes the data from the given table.

Syntax

INSERT INTO table_name ( column1, column2, …….. )

VALUES ( value1, value2, ……… )

The table_name represents the table in which data is to be inserted.

All the columns in the table_name need to be specified in the brackets in the insert into clause.

All the values in the values clause should correspond to the columns, both in the order in which the columns are mentioned and the data type of the values should match the respective column.

Example

Consider the table Person consisting of columns id, name, gender having data type integer, varchar and varchar, respectively.

In order to add data to all the columns of the Person table, the command is as follows.

Insert into Person ( id, name, gender )

Values ( 101, “Alexis”, “Male” );

In the above command, value is present for each column in the respective order. Also, the format of the data match the format of the columns.

Other versions of the insert command add data only to some columns in the table.

Insert into Person ( id, name )

Values ( 102, “Aayesha” );

The above command adds data only to two columns as mentioned.

Also, null value can be added using insert command.

Insert into Person ( id, name, gender )

Values ( 103, “Brainly dot com”, null );

Since null value appears at number three, the corresponding column to this value is also number three, i.e., gender column.

This inserts null value as the gender for Brainly dot com.

3 0
3 years ago
Open "Wireshark", then use the "File" menu and the "Open" command to open the file "Exercise One.pcap". You should see 26 packet
murzikaleks [220]
Idk idk idk idk idk idk
8 0
3 years ago
Other questions:
  • g Create a public non-final generic class called YourSimpleLinkedList. You should extend SimpleLinkedList which is parameterized
    10·1 answer
  • PPE that should be used by every technician include all of the following, EXCEPT
    6·2 answers
  • How to be professional in graphic design without CAD?
    5·1 answer
  • Angelika just submitted her product for the first time, and she had 2 errors, 3 warnings, and 5 notifications. What does she nee
    7·2 answers
  • What problems have arisen regarding use of the Internet for global business transactions, and how are they being resolved?
    15·1 answer
  • When parallel parking, you should select a space that is __________ as long as your car.
    11·1 answer
  • A local bank has just one branch. It sets up a peer-to-peer network for all devices on the system. The bank would like to be abl
    12·1 answer
  • In this line of code, what does 144 refer to?
    12·1 answer
  • Can someone urgently help me with my java code? Ive been working on it for hours and its not working.
    15·1 answer
  • Three positive impacts of computer technology in our society.​
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!