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
KiRa [710]
3 years ago
4

Assign secretID with firstName, a space, and lastName. Ex: If firstName is Barry and lastName is Allen, then output is:

Computers and Technology
2 answers:
k0ka [10]3 years ago
7 0

Answer:

Here is the statement that is to be added in the given program:

secretID=firstName+" "+lastName;

This statement has an operator + which is used to concatenate two strings i.e. firstName and lastName. The string stored in firstName is concatenated with the string stored in lastName with a space " " between both the string which is specified in the statement. So there are two + operators used in the above statement, one is used to concatenate firstName string followed by a space and the other is used to concatenate lastName string following a space, thus as a whole creating a new string by concatenating firstName and lastName strings together with a space between them.

Explanation:

Here is the complete program:

#include <iostream> //used for input output functions

using namespace std; //to identify objects like cin cout

int main() { //start of main function

string secretID; // declares a string type variable

string firstName; //declares a string type variable to hold first name

string lastName;//declares a string type variable to hold last name

cin >> firstName; //reads first name from user

cin >> lastName; //reads last name from user

secretID=firstName+" "+lastName; //concatenates first and last names with a space between

cout << secretID << endl; //displays the concatenated string

return 0;}

Suppose the user enters "Barry" in firstName and "Allen" in lastName. So the output of the above program is:

Barry Allen

The screenshot of the program along with its output is attached.

nasty-shy [4]3 years ago
6 0

Answer:

secretID = firstName;

     char spaceChar = ' ';

     secretID = secretID + spaceChar;

     secretID = secretID.concat(lastName);

Explanation:

You might be interested in
Write a brief explanation of the problems that can occur in each of the following scenarios and what you should do to avoid thes
photoshop1234 [79]
1. Horsing around can lead to breaking equipment in the classroom or somebody getting hurt

2. leaving your backpack on the floor can cause someone to fall

3.something unexpected may happen and worsen the problem

4. it can corrupt the computer's files and deleted unsaved work.

if you want the sentences to be longer, add some words to them and make the message the same.
4 0
4 years ago
Isla is writing a report on the best roller coasters in America. Which device could help her with this?
Ulleksa [173]

Answer: a device that can help could be a map.. she could learn about that place then see if its coasters are better.

Explanation: i dunno if i'm right

~shina~

4 0
3 years ago
Is a multiuser computer system that runs a network operating system?
jasenka [17]
No . A multiuser computer system does not run a network operating system
8 0
4 years ago
List 4 activities that might be included as part of a dependable software engineering process. Which of these do you think are m
Bogdan [553]

Answer:

  • Requirement Management
  • Requirement Reviews
  • Requirement Specification
  • System Modeling

Explanation:

Requirement Management  and specification are most suitable for agile project.

7 0
3 years ago
To aid in risk reduction programs, Tennessee firms are required to keep written records of all real estate transactions for at l
Lelu [443]

Answer:

Three Years

Explanation:

Tennessee firms are required to keep written records of all real estate transactions for at least 3 years after closing or termination to avoid any unforeseen risk in future.

8 0
3 years ago
Other questions:
  • External hard disks use different technology than internal hard disks. ture or false
    6·1 answer
  • Ethics issues are significant in the area of online privacy because laws have not kept pace with the growth of the Internet and
    12·1 answer
  • How do you uninstall sc update?
    13·2 answers
  • After completion of this chapter, you should be able to:  Describe the structure of an IPv4 address.  Describe the purpose of
    5·1 answer
  • 1. Write a function that will ask the user to enter a value in dollars. The function should calculate and display the equivalent
    9·1 answer
  • Which type of computer operating system would be best for a large corporation?
    7·2 answers
  • Which of the following is not a method for opening Word software?
    8·2 answers
  • Non-preemptive Shortest Job First (SJF) scheduling policy is not optimal if:
    7·1 answer
  • The IT Department already has been testing Windows Server 2012 R2, and some time ago purchased licenses to convert all of its Wi
    14·1 answer
  • In which of these areas can software engineers specialize?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!