Skip to content

Instantly share code, notes, and snippets.

@szolotykh
Created April 19, 2013 04:21
Show Gist options
  • Save szolotykh/5418136 to your computer and use it in GitHub Desktop.
Save szolotykh/5418136 to your computer and use it in GitHub Desktop.
Int to string function. Note: Don't forget to free the memory after using function
char* intToStr(int num){
char* str = (char*)malloc(12);
sprintf(str, "%d", num);
return str;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment