04-24-2011, 02:07 AM
char s1[] = "example"; char s2[20] = "another example" would store the two strings as follows: s1 |e|x|a|m|p|l|e|\0| s2 |a|n|o|t|h|e|r| |e|x|a|m|p|l|e|\0|?|?|?|?| sir this example is working. but i want to take name input from user including a space. in that case i am facing problem. i can read only first part of the name from array. for example if user enters TARIQ MEHMOOD. i can only read TARIQ. char name[20]; cout<<"please enter your complete name"'; cint>>name; cout<