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

9 Years
Discussion Span
Last Post by joshua.tilson

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.


This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.