Note that -
- scanf with %s accepts only String which does not contain whitespaces (blanks/space)
- C Supports the ' special Edit set Conversion Code ' , by using this method we can accept the line of String with spaces using scanf
- It Reads wide verity of Characters including blank
Live Example :scanf("%[^\n]", name );
Output of this Block :char name[100]; printf("\nEnter the name : "); scanf("%[^\n]",name); printf ("\nName of Student : %s ",name);
Enter the Name : Don Bosqo Name of Student : Don Bosqo
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