Syntax :
What it actually does ?int sscanf (const char *buffer, const char *format [, address, ...]);
- Data is read from array Pointed to by buffer rather than stdin.
- Return Type is Integer
- Return value is nothing but number of fields that were actually assigned a value
Explanation of above Example :char name[20]; int age,salary; sscanf("Ram 23 4000 " ," %s %d %d ",name,&age,&salary);
- We accept values from user and store them into Respective memory Locations
- But by using sscanf functions instead of accepting data from stdin , we are reading data from the array
- In the above Example "Ram 23 4000" are three values are assigned to name,age and salary
Variable Name | Value | |
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