answersLogoWhite

0

RemoveSpaces (char *str) {

char *new = str;

while (*str != '\0') {

if (*str != ' ') *(new++) = *str;

str++;

}

*new = '\0';

}

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Write a java program to count the space from the given line?

.... String line = "This is example program with spaces"; String[] tokens = line.split(" "); System.out.println(tokens.length-1); .......


Program to generate tokens from a given expression string?

a promlem to solve an equation or a assigment


Do I need to write a program to find a substring in a given string in c plus plus?

No.


How to write A Java program to print number of digits in a given number?

One way to do this is to convert the number to a String, then use the corresponding String method to find out the length of the String.


How do you delete the given string in java programming?

You usually do not need to delete a String, since when the program no longer refers to it, the garbage collector will clean it up.


Write a program to change the case of the given string?

This functionality is already in Java. String.toLowerCase() and String.toUpperCase() will take care of it for you.


Could you write a assembly language program in tasm To check whether a given number present in a sequence of given memory location containing the string to be checked in 8086?

8086 assembly language program to check wether given number is perfect or not


How do you write a program to find the no of words in a given string in dot net?

You find a language that can be targeted towards the .NET Framework. What you are suggesting is something related to string manipulation and you can work with delimiters.


Write a Java Program to find occurences of given word in a text?

Check the documentation of the String class, for a method that searches for a substring.


A C program to print the number of words from given String?

/*We can calculate this with a lot of methods I'll explain only one of them */ *str = "abcd"; // this is a input string printf("%d", strlen(str));


Write a program in c to convert a given string to lower case?

Use the tolower() function. Example: char* a = 'X'; a = tolower(a); printf("%c", a);


Is there a way to use regex to determine if a given string is a palindrome?

Yes, you can use regex to determine if a given string is a palindrome by reversing the string and then comparing it to the original string using regex.