Fork Copy // Example program #include #include #include using namespace std; int main() { char* input = "123456"; int result = 0; int length = strlen(input); for (int i = 0; i < length; i++) { result *= 10; result += (input[i] - '0'); } cout << result; }