How to Take whitespace in Input in C
Posted
by itsaboutcode
on Stack Overflow
See other posts from Stack Overflow
or by itsaboutcode
Published on 2009-10-12T17:00:19Z
Indexed on
2010/06/11
6:33 UTC
Read the original article
Hit count: 265
I wanted to take character array from console and it also include white spaces, the only method i know in C is scanf, but it miss stop taking input once it hit with white space. What i should do?
Here is what i am doing.
char address[100];
scanf("%s", address);
© Stack Overflow or respective owner