Monday, July 9, 2007

How to scan a string till we hit a new line using scanf()?

Use



scanf("%[^\n]", address);

11 comments:

Anonymous said...

awesome..

Anonymous said...

its called edit set conversion code can also use gets

Anonymous said...

Why does Anonymous have to comment for every code written here/

Anonymous said...

gets(string);

this will do d same thing....

Anonymous said...

gets will read the \n which is sometimes not wanted

Anonymous said...

Thanks for the info. It is very helpful.
RegardsEducational site
Get jobs info at Educational site

Anonymous said...

Hello mates, how is all, and what you desire to say regarding this article, in my view its actually awesome for me.


Here is my page: waist height ratio

Anonymous said...

check this out buy propecia 5mg - where to buy propecia in bangkok

Anonymous said...

Its like you learn my mind! You appear to grasp a lot approximately this, like you wrote
the e book in it or something. I believe that you can do with some % to force the message home a
little bit, but other than that, this is magnificent
blog. A great read. I will certainly be back.

my weblog :: arizona law firm

Anonymous said...

smokeless cigarettes, electronic cigarettes reviews, e cig forum, smokeless cigarettes, electronic cigarettes, e cigarette

west kirby skate said...

Thank youu for sharing