subject

Given a string, an integer position, and a character, all on separate lines, find the character of the string in that position and replace it with the character read. Then, output the result. Ex: If the input is: warn -D-D - Du 0 e the output is: earn Note: Using a pre-defined string function, the solution can be just one line of code. 1 #include 2 #include 3 using namespace std; 4 5 int main() { 6 string workStr; 7 int idx; 8 char newChar; 9 19 getline(cin, workStr); 11 cin >> idx; 12 cin >> newChar; 13 14 15 16 cout << workStr << endl; 17 18 return; 19} 1 2 3

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:00
When designing content as part of your content marketing strategy, what does the "think" stage represent in the "see, think, do, care" framework?
Answers: 3
question
Computers and Technology, 24.06.2019 03:30
Explain the importance of html in web page designing in 20 sentences..
Answers: 1
question
Computers and Technology, 24.06.2019 06:30
Me and category do i put them in because this is science
Answers: 1
question
Computers and Technology, 24.06.2019 10:30
Which of the following types of software is most applicable to the promotion of new products through advertising? a.databases b. spreadsheets c. web design programs d. word processing tools
Answers: 2
You know the right answer?
Given a string, an integer position, and a character, all on separate lines, find the character of t...
Questions
question
History, 19.10.2021 05:50
question
Mathematics, 19.10.2021 05:50