Skip to content

Instantly share code, notes, and snippets.

@kartikx
Created October 28, 2020 16:19
Show Gist options
  • Save kartikx/3fc9a073720bbb3d6aae2721d6f7460e to your computer and use it in GitHub Desktop.
Save kartikx/3fc9a073720bbb3d6aae2721d6f7460e to your computer and use it in GitHub Desktop.
int testConvert(char* str) {
int num = 0;
while (*str != '\0') {
num = num*10 + (*str - '0');
str++;
}
return num;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment