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
BigorU [14]
2 years ago
6

Which statement will read an entire line of input into the following string object?

Computers and Technology
1 answer:
Solnce55 [7]2 years ago
6 0

Answer:

getline(cin, address);

Explanation:

Given

String object: address

Required

Statement that reads the entire line

The list of given options shows that the programming language is c++.

Analysing each option (a) to (e):

a. cin<<address;

The above instruction will read the string object until the first blank space.

Take for instance:

The user supplied "Lagos state" as input, only "Lagos" will be saved in address using this option.

b. cin address:

This is an incorrect syntax

c. getline(cin,address);

Using the same instance as (a) above, this reads the complete line and "Lagos state" will be saved in variable address

d. cin.get(address);

address is created as a string object and the above instruction will only work for character pointers (i.e. char*)

<em>From the above analysis, option (c) is correct.</em>

You might be interested in
What are the six command groups in powerpoint
DiKsa [7]

Answer:

Clipboard, Slides, Font, Paragraph, Drawing, and Editing

3 0
3 years ago
What does the word "e-business" mean?
Zepler [3.9K]
It stands for Electronic Business, a typical example of this is a online store.
4 0
3 years ago
Read 2 more answers
, , ,g d,t ,dt m,dt ymtd
maks197457 [2]

Answer:ummm me confused

Explanation:

4 0
3 years ago
Can you right the C++ of this algorithm? Inizio = Start, Fine= End. THANK YOU SO MUCH!!
posledela
<span>#include <iostream> using namespace std; bool bears(int n); int main(){ int number; do{ cout<<"enter the amount of bears (press 0 to stop the program): "; cin>>number; if (bears(number)){ cout<<"you have reached the goal!"<<endl; } else{ cout<<"sorry, you have not reached the goal."<<endl; } }while(number != 0); } bool bears(int n){ if (n < 42){ return false; } else if (n == 42){ return true; } else{ if (n % 5 == 0){ return bears(n - 42); } else if(n % 2 == 0){ return bears(n / 2); } else if(n % 4 == 0|| n % 3 == 0) { int one; int two; one=n%10; two=(n%100)/10; return bears(n - one * two); } } <span>}</span></span>
4 0
3 years ago
Microsoft word 365 allows cells to be split into how many columns
Bogdan [553]

Answer:

Microsoft word 365 allows two columns

8 0
3 years ago
Read 2 more answers
Other questions:
  • Which tab provide text formatting features
    11·1 answer
  • To draw a clustered cylinder chart, first select the data to be charted and then click the column button (insert tab | charts gr
    13·1 answer
  • ***Help ***Which Paste Command is used to insert a new linked Excel worksheet into a PowerPoint presentation? A. Embed B. Use De
    7·1 answer
  • Which of the following statements is true of a time management plan? It is work in progress that need to be altered many times?
    10·1 answer
  • As part of a team, you are assigned to create a financial report. One of your tasks is to put the pieces together as other team
    5·1 answer
  • What is the difference between player-centric game design and designer-centric game design? How does a player-centric game assis
    7·1 answer
  • Handhed computer is otherwise called as<br> 1.laptop<br> 2.Notebook<br> 3.Palmtop
    7·1 answer
  • Use Spreadsheet Functions and Formulas
    6·1 answer
  • Which of the following items in the folder window allows users to view locations which have been visited before?
    6·1 answer
  • A. Get a value for x from the user.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!