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
Write a program name Dollars that calculates and displays the conversion of an entered number of dollars into currency denominat
Cloud [144]

Answer:

I will code in Javascript.

Preconditions:

  • The variable dollar is passed by parameter to the function.

function Dollars(dollar) {

 

//declare and initialize the variables.

 var twenties = 0;

 var tens = 0;

 var fives = 0;

 var ones = 0;

 

<em>//If dollar is greater or equals 20, divide dollar by 20 and save it into the variable twenties. Then, save the remainder into the variable dollar.  </em>

 if(dollar >= 20){

   twenties = Math.floor(dollar/20);

   dollar = dollar % 20;

 }

<em>//If dollar is greater or equal 10, divide dollar by 10 and save it into the variable twenties. Then, save the remainder into the variable dollar.  </em>

 if(dollar>=10){

   tens = Math.floor(dollar/10);

   dollar = dollar % 10;

 }

<em>//If dollar is greater or equal 5, divide dollar by 5 and save it into the variable twenties. Then, save the remainder into the variable dollar.  </em>

 if(dollar>=5){

   fives = Math.floor(dollar/5);

   dollar = dollar % 5;

 }

<em> //If dollar is greater or equal 1, divide dollar by 1 and save it into the variable twenties. Then, save the remainder into the variable dollar.   </em>

 if(dollar>=1){

   ones = Math.floor(dollar/1);

   dollar = dollar % 1;

 }

//At this point, dollar is equal 0.It's time to display the conversion.

Console.log('20s :' + twenties);

Console.log('10s :' + tens);

Console.log('5s :' + fives);

Console.log('1s :' + ones);

}

Explanation:

The variable Math.floor(num) is used to round a number downward to its nearest integer.

For example, if dollar=57:

twenties = dollar/20 will be 57/20 = 2

dollar = dollar % 20 will be 57 % 20 = 17

tens = dollar/10 will be 17/10 = 1

dollar = dollar % 10 will be 17 % 10 = 7

fives = dollar/5 will be 7/5 = 1

dollar = dollar % 5 will be 7 % 5 = 2

ones = dollar/1 will be 2/1 = 2

dollar = dollar % 1 will be 0 % 5 = 0

7 0
3 years ago
Is Apple a consumer or luxury brand? Give examples.
Alexus [3.1K]

Answer:

Apple is a luxury brand due to it stable products, expensive products, and its releasing phones costing $1,000 or more and moving its services to the higher end

Explanation:

6 0
3 years ago
**HELP ME PLS**
melisa1 [442]

The true statement is the report is grouped only because it gives information about employees by number of years of employment.

<h3>What is a group report?</h3>

Group reporting is made up of consolidation method and analytical reports and it gives information on the output of a firm.

Note that since there are different ranges of employment years, the report need to be grouped and as such, The true statement is the report is grouped only because it gives information about employees by number of years of employment.

Learn more about group report from

brainly.com/question/13628349

#SPJ1

4 0
2 years ago
Match each word to its correct meaning.
seropon [69]
1. goes to C.

2. goes to B.

3. goes to A.
6 0
3 years ago
What type of authentication does the dod require to access sensitive data on mobile devices and/or e-mail?
motikmotik
<span>Actually dod requires a digital type of authentication and a secure password inorder to access sensitive data on mobile devices and email, which may in the form of two step authentication code, then in the form digital phone calls, and then in the form of alphanumeric passwords and finally in the form of finger prints authentications or face recognition verification..</span>
8 0
3 years ago
Other questions:
  • A four-year old laptop will not boot and presents error messages on screen. You have verified with the laptop technical support
    11·1 answer
  • The unique global address for a web page or other resource on the internet is called the ________.
    7·1 answer
  • Wich is the last step in conducting a URL search
    14·2 answers
  • Traditional methods of business communication tend to mean paper-based messages such as formal letters, brochures, reports, prop
    10·1 answer
  • In his article “is google making up stupid” Nicholas Carr uses a metaphor to suggest that
    11·2 answers
  • Which of the following are tasks you can
    12·2 answers
  • Write a program that allows the user to enter a time in seconds and then outputs how far an object would drop if it is in free f
    7·1 answer
  • Pls tell me the answer pls i need the answer
    6·2 answers
  • Heyyyyyy who likes anime​
    12·2 answers
  • which filename refers to a 16-bit real-mode program that queries the system for device and configuration data, and then passes i
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!