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
dedylja [7]
3 years ago
8

Given a string, an integer position, and a character, all on separate lines, find the character of the string in that position a

nd replace it with the character read. Then, output the result.
SAT
1 answer:
Korolek [52]3 years ago
3 0

Following are the C++ program to replace a character value from the input string:

Program Explanation:

  • Defining header file.
  • Defining the main method.
  • Defining three different types of variables "str, P, and Ch" that are "string, integer, and character".
  • After input value into the above variable, a character at method is declared that <em><u>takes position index value and replaced by character</u></em>.
  • At the last using print method that <em><u>prints replaced string value</u></em>.

Program:

#include <iostream>//header file

#include <string>//header file

using namespace std;

int main() //main method

{

   //defining variables

 string str;//string

 int P;//integer

 char Ch;//character

 cin>>str;//input string value

 cin >>P;//input integer value

 cin >> Ch;//input character value

 str.at(P)  = Ch; //uing char-at method that takes position index value and replaced by character

 cout << str << endl;//print replaced string value

 return 0;

}

Output:

Please find the attached file.

Learn more:

brainly.com/question/24497583

You might be interested in
Exercising too much in an effort to burn calories and lose weight, also called
MAXImum [283]

Answer:

Compulsive exercise

Explanation:

Exercising too much in an effort to loose weight and burn calories is called Compulsive exercise. It is also a disorder commonly found in children

3 0
3 years ago
a small business specializing in computer repair implements an automated process that routes customer requests to the technician
rusak2 [61]

The quality of automation that has been shown in the question is basically cumulative.

Given that a small business specializing in computer repair implements an automated process that routes customer requests to the technician best suited for the job. Although the automated solution only reduces a few minutes of time from each request, it results in the business being able to complete several hundred more service orders per year.

We are required to tell the quality of the the automation done in the business.

Automation is basically the technique of making an apparatus, a process, or a system operate automatically.

The quality of automation shown in the question is cumulative.

Cumulative means collecting the things at a place.

Hence the quality of automation that has been shown in the question is basically cumulative.

Learn more about automation at brainly.com/question/23953526

#SPJ4

4 0
2 years ago
Damage analysis; resource acquisition, assignment, and tracking; and spatial and data analysis are all examples of _____________
dedylja [7]

Answer: Essential functions

4 0
3 years ago
Read 2 more answers
Conduction is the transfer of heat energy by
ivanzaharov [21]
Heat is transferred by conduction when adjacent atoms vibrate against one another, or as electrons move from one atom to another. Conduction is the most significant means of heat transfer within a solid or between solid objects in thermal contact.
3 0
3 years ago
Which composition of similarity transformations maps polygon abcd to polygon a'b'c'd'? a dilation with a scale factor of and the
Igoryamba

Answer:

B a dilation with a scale factor of 1/4 and then a translation

Explanation:

on edgenunity

8 0
2 years ago
Read 2 more answers
Other questions:
  • Esther is pregnant and preparing for the birth of her first baby. In college, she ran up a large credit card bill and is still t
    12·2 answers
  • In the figure above, RT = TU. What is<br> the value of x ?<br> A) 72<br> B) 66<br> C) 64<br> D) 58
    15·2 answers
  • Select the correct answer
    12·2 answers
  • How do you identify the information about the learner’s performance?​
    5·1 answer
  • what is the final the electric force decreases because the distance has an indirect relationship to the force
    14·2 answers
  • Which topic is suitable for the size and scope of a five-paragraph essay? the history of weather science and climatology the stu
    9·1 answer
  • Paleomagnetism is... Question 11 options: The study of rocks Collecting oceanic rocks The study of magnets The study of the magn
    14·1 answer
  • Put the events in order to show the chain of events.
    8·1 answer
  • Let c be the curve defined by x2+y2=36. Consider all points (x,y) on curve c where y&gt;0. Which of the following statements pro
    8·1 answer
  • An investor in Georgia acquired securities under a Rule 147 intrastate offering and has now held them for eight months. Which of
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!