1 strcpy(str, "98993489");
2 val = atoi(str);
3 printf("String value = %s, Int value = %d\n", str, val);
1#include <sstream>
2
3using namespace std;
4
5int main()
6{
7 stringstream str;
8
9 str << "1";
10
11 double x;
12 str >> x;
13}