Example & Tutorial understanding programming in easy ways.

How we take an input of string with white space?

Basically, we use scanf() to take input of any type.


Like:

char str[20];

scanf("%s",&str);


But in this, it can not take the input with white space like "r4r website" but str only strore "r4r"


Solution:

char str[20];

gets(str);


-We take string input using gets() function

Read More →
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!