C program to remove all spaces from a given string
Given a string with spaces and we have to remove all spaces from it using C program.
Without using other temporary string, in this program - we are reading a string from the user and then printing the string (by updating the same string variable) after removing all spaces from it.
Example:
Input:
String: "C is the master of all"
Output:
String: "Cisthemasterofall"
Input:
String: "I love includehelp.com"
Output;
String: "Iloveincludehelp.com"
Program to remove all spaces from a given string in C
Output
need an explanation for this answer? contact us directly to get an explanation for this answer