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
34kurt
3 years ago
6

Declare a char array named line of size 50, and write a statement that reads in the next line of console input into this array.

(Assume the line may contain whitespace characters and the total number of the characters in the line is less than 50)
Computers and Technology
1 answer:
SashulF [63]3 years ago
8 0

Answer:

Following are the statement in the C++ Programming Language.

//set character data type variable

char line[50];

//get character input from the user

cin.get(line, 50);

Explanation:

<u>Following are the description of the statement</u>.

  • In the above statement, we set character data type array variable that is 'line' and its index value is '50' that means the following variable not contain more than 50 character elements.
  • In the other line, we get character type input in the following variable 'line' from the user through the get() method.
You might be interested in
Please help ASAP !!!
UNO [17]

Answer:

the answer is Compose

Explanation:

7 0
3 years ago
20 examples of input device?
kiruha [24]

Answer:

Computer keyboard,Microphone,Image scanner,Touchscreen,light pen

Explanation:

sorry  that   all  device i  know

8 0
3 years ago
Read 2 more answers
Data is communicated through various input devices true or false​
kipiarov [429]
I would believe this is true if the following are also true.

Input devices are things like keyboards, mouses, buttons, e.c.t.

If that is true then I would believe it to be true due to multiple inputs are being used to communicate.
3 0
3 years ago
Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both doubles) as input, and output the g
zepelin [54]

Answer:

Explanation:

The following is written in C++ and asks the user for inputs in both miles/gallon and dollars/gallon and then calculates the gas cost for the requested mileages using the input values

#include <iostream>

#include <iomanip>

using namespace std;

int main () {

   // distance in miles

   float distance1 = 20.0, distance2 = 75.0, distance3 = 500.0;

   float miles_gallon, dollars_gallon;

   cout << "Enter cars miles/gallon: "; cin >> miles_gallon;

   cout << "Enter cars dollars/gallon: "; cin >> dollars_gallon;

   cout << "the gas cost for " << distance1 << " miles is " << fixed << setprecision(2) << (float) dollars_gallon * distance1 / miles_gallon << "$\n";

   cout << "the gas cost for " << distance2 << " miles is " << fixed << setprecision(2) << (float) dollars_gallon * distance2 / miles_gallon << "$\n";

   cout << "the gas cost for " << distance3 << " miles is " << fixed << setprecision(2) << (float) dollars_gallon * distance3 / miles_gallon << "$\n";

   return 0;

}

8 0
3 years ago
Seeing her Daughter graduate from college is most likely a short term goal for a person of which of these ages ? A) 24 years old
scoray [572]
C because you can’t graduate at 4 or 14 and if your kid is graduating when you’re 24 then that means you have birth at 7 years old which isn’t possible.
4 0
3 years ago
Other questions:
  • Leslie’s form collected a huge amount of data. Over time the employees felt that the applications slowed down. What should lesli
    12·1 answer
  • In a relational database design, all relationships are expressed by ________.
    10·1 answer
  • Resolution has the most impact on the size of photo print you can make.
    8·1 answer
  • The language C was originally developed by​
    11·2 answers
  • If you do not specify any criteria in a delete query, Access will delete all the records in the table. Truth or False
    11·1 answer
  • Consider the following statement from the CS Principles course framework: The global distribution of computing resources raises
    12·1 answer
  • If you could represent yourself with one object from your home what would it be ?
    9·2 answers
  • Choose the correct term to complete the sentence.
    11·1 answer
  • What is the alogarithm for solving the perimeter of a triangle
    11·1 answer
  • In windows 10, where would you save the template so it is available in the available templates list in backstage view?.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!