// in this i am going to show you the usage of %s // string is just a combination of character /* there are three ways to enter and display it 1) Using loop & %c 2) using gets 3) using %c *\ #include int main() { char stringloop[40],stringgets[40],stringusing_s[40]; //__________________________________________For loop & %c int loop for(loop=0; loop<40; loop++) scanf(" %c ",&stringloop[loop]); for(loop=0; loop<40; loop++) printf(" %c ",stringloop[loop]); //_______________Using Gets Most Simple(Some compiler show warning for this Don't panic if it comes Just run It) gets(stringgets); puts(stringgets);// displaying using puts //_________________________Using %s __________________________________________________ scanf("%s",stringusing_s); printf("%s",stringusing_s); // among these the best method is using for loop i.e.First method }