Hi guys, wondering If I could have some help, I am trying to design a simple program that will allow a user to enter some text, then the program will read the text and change the letter m to the letter S. at the moment I can get it to display a text string that has a letter m in it, yet dont know how to change it to a s, Im sure its a simple line of code I need, Just starting off in C so any help would be greatly appriciated
CraigCode:#include <string.h> int main( void ) { char text[ 256 ] = { '\0' }; int found = 0; int counter; printf( "Please enter a string: " ); scanf( "%s", text ); for ( counter = 0; counter < strlen( text ); counter++ ) { if ( text[ counter ] == 'm' ) { found = 1; break; } } if ( found ) printf( "\n%s", text ); else printf( "\nNot found" ); }