You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cout << "Value of : " << str << " is :- " << n << endl;
}
}
/* Program Description:
sscanf takes three parameters:- the first one is a c type string, the second one is the format type and the third one is the variable to store the result.
It reads the content of the string, formats it using the format type and stores that value in the third parameter variable.
We can use sscanf to convert one string to an integer.
The second parameter will be %d for this conversion in this case.
Also, even here only Integral part is taken into count.