If wanted to take a character array such as "Hello! Whats up?" and wanted to turn it into this: "hellowhatsup".
How would i go about doing that?
Also i would like to accept numbers as well.
1 2 3 4 5 6 7 8 9 10 11 12
char initial_string [30] = "Hello! Whats up?",
second_string [30];
for (int i = 0; i < 30; i++)
{
if ( How do I get rid of spaces and punctuation )
{
second_string[i] = initial_string[i];
second_string[i] = tolower(second_string[i]);
}
}
That is what I have been thinking so far. Any help would be greatly appreciated.