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

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

Computers and Technology
1 answer:
Solnce55 [7]3 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
HELP LOTS OF POINTS! I WILL GIVE YOU 100+ POINTS IF ANSWERED CORRECTLY!!!
Delicious77 [7]

Answer:

E) all of the above

Explanation:

Your device can track your location, which means that it will tell where you've been. When you post on social media or just online, you are sharing what you're thinking. Your friends and family can easily be traced back to you, so they know who your friends and family are, and we leave evidence of what we've done because whatever you click gets tracked. hope this helps :)

4 0
3 years ago
The function below takes two arguments: a dictionary of strings (keys) to integers (values) a_dict and a list of strings key_lis
vitfil [10]

Answer:

  1. def getData(a_dict, key_list):
  2.    result = []
  3.    for key in key_list:
  4.        result.append(a_dict[key])
  5.    
  6.    return result  
  7. result = getData( {"puffin": 5, "corgi": 2, "three": 3} , ["three", "corgi"])
  8. print(result)

Explanation:

Let's define a function <em>getData() </em>with two parameters,<em> a_dict </em>and <em>key_list</em> as required by the question (Line 1).

Since the function is to return a list of associated values of dictionaries, a new list,<em> result</em>,  is declared and initialized with empty values (Line 2).

Next, use for-loop to traverse through every string in the input <em>key_list </em>(Line 4) and use the traversed key to address the value in the<em> a_dict </em>and add it to the <em>result</em> list (Line 5)

At last, return the <em>result </em>list as output (Line 7)

We can test the function using the test case from the question and we shall see the output as follows:

[3, 2]

8 0
3 years ago
The laws governing search and seizure in the public sector are much more straightforward than those in the private sector. TRUE
Lapatulllka [165]

Answer:

True

Explanation:

Because of the contract that you have agreed to when joining the work force. Which is different from the private sector.

7 0
3 years ago
when a sender encrypts a message using their own private key, what security service is being provided to the recipient?
Rudik [331]

asymmetric encryption

4 0
3 years ago
Of the following hard drives, which one is fastest?
Anvisha [2.4K]

Answer:

D. PCIe NVMe SSD card

Explanation:

PCIe NVMe SSD cards are ludicrously fast even compared to some modern SSD drives today. Some can even average up to 8 GB/s while moving/copying files, though, the price tag is pretty high compared to some other SSD / HDD drives.

5 0
3 years ago
Other questions:
  • A bare metal area surrounded by body filler after sanding indicates:
    8·1 answer
  • 9. In Electronic Codebook (ECB): a. The message is broken into independent blocks which are encrypted b. The message is broken i
    6·1 answer
  • These devices: monitor, earphone, speakers are examples of what? Input devices Storage devices Output devices All answer are cor
    10·2 answers
  • When a formula contains the address of a cell, it is called a(n)
    9·1 answer
  • A style manual can be described as
    11·2 answers
  • Do the shape of a sign gives you a clue about the information contained on the sign
    7·1 answer
  • Setting up a desktop computer for anAutoCADspecialist who needs a minimum of 125 GBram which operating system would be the best
    5·1 answer
  • How could the company benefit by applying Agile principles?
    5·2 answers
  • Computer system with a 32-bit logical address and 4k-byte page size. assume that each entry of a page table consists of 4bytes.
    6·1 answer
  • What are the small squares that appear in the corners and in the middle of the sides of a selected object's border called?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!