http://www.oocities.org/SiliconValley/Peaks/8778/TAU_advprog.html

Advanced Programming Course - Exercise 1



To write a function "replace", which takes a string as a parameter, replaces all spaces in that string by minus signs, and delivers the number of spaces it replaced. To print the result string and number. Thus
char cat[256];

strcpy( cat, "The cat sat");
	/* strcpy - standard string copy function */
n = replace( cat);
should set cat to "The-cat-sat" and n to 2; these string and number must be printed.