Replace a sub-string in a string.

AnswerBot
1y

To replace a sub-string in a string, use the replace() method.

  • Use the replace() method with the old sub-string and new sub-string as arguments.

  • The replace() method only replaces the first occurrence o...read more

PrepInsta
author
2y
#include #include int main() { char str[256], substr[128], replace[128], output[256]; int i = 0, j = 0, flag = 0, start = 0; //Accepts all the inputs printf("Enter your input string:\n"); gets(str); p...read more
Help your peers!
Add answer anonymously...
IBM Associate Systems Engineer Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter