I am writing a simple program that takes a string input from a user, stores it in a dynamically allocated array, changes it to upper case, and then prints. It works for all letters and symbols but when I use a space character, the program automatically exits. Can someone please help?

************************** OUTPUT ******************************
Please enter a string: windows*&$@

Your string in caps is: WINDOWS*&$@

Enter any key to continue...

But if I type in: windows open

I get nothing :(


solved it .. thanks

Glad to hear you solved the problem!
Perhaps if you have the time, you could explain the reason it was happening and what you did to fix it, I know some of the beginner programmers (like me) could really learn from it.