Problem 1824. Find and replaces spaces from a input string with *

Created by Swapnali Gujar in Community

For a given input string str, find how many spaces are there in the string and replace those spaces with * e.g. str = 'this is demo of replacing spaces with stars'; Then, out = 'this*is*demo*of*replacing*spaces*with*stars'

Solution Stats

84.68% Correct | 15.32% Incorrect
Last solution submitted on Mar 09, 2019

Recent Solvers103

Suggested Problems

More from this Author25

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!