hey everbody, i have just stared c programming as part of my university course, and i am trying to store text that a user inputs, i store it as "char" type and when i try to display the text later it only shows the first letter???
thanks
hey everbody, i have just stared c programming as part of my university course, and i am trying to store text that a user inputs, i store it as "char" type and when i try to display the text later it only shows the first letter???
thanks
You'll need to look into arrays. What you'd want would be something like:
char somename[50];
Which would give you a string that could have a length of 49 chars in it. Later, you'll learn about dynamic memory and be able to store several MB worth of text via the use of malloc().