By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,109 Members | 969 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,109 IT Pros & Developers. It's quick & easy.

How do i alter the string so that it can contain spaces?

P: 1
#include <stdio.h>

main ()
char string[100];

printf("Enter a sentence: ");
scanf("%s", string);

printf("You entered \"%s\".\n", string);
Dec 7 '10 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 2,398
Look here.
Dec 8 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.