Environmental Sciences, asked by Mathematics6274, 10 months ago

User input and replace string template hello username how are you

Answers

Answered by kumarsonu56367
1

Explanation:

I am fine how are you this is a wrong question

Answered by lovingheart
2

The output for the replaced string will be "how are you"?

Explanation:

  • The c program can be written to get the string from the user and with the help of replace function, one string can be replaced by the other.

#include <stdio.h>

# include <conio.h>

void main()

{

string s1, s2:

system.out.println (" Enter the first string from the user:);

string s1= "hello";

string s2= s1. replace ("how are you");

system. out. println (string s2);

System .out. println ("replaced string = "+replaced string):

getch ();

}

To know more:

1) Differentiate between replace and replace all?

https://brainly.in/question/11247072.

2) When you replace a string is it modified?

https://brainly.in/question/5544363

Similar questions