Syntax for Accepting String :
- gets(variable name)
Example :
- gets(name);
- gets(city)
Live Example :
#include<stdio.h>
void main()
{
char name[20];
printf("\nEnter the Name : ");
gets(name);
}
Rules / Facts :
- %s is not Required
- Spaces are also counted in String ( Space Allowed )
- String Acceptance Terminated When 'Enter/New Line' Encountered
Bookmark & Share



0 Comments:
Post a Comment
Your Feedback :This is Growing Site and Your Feedback is important for Us to improve the Site performance & Quality of Content.Feel Free to contact and Please Provide Name & Contact Email