I am coding in C on linux, and I need to reverse a number. (EG: 12345 would turn into 54321), I was going to just convert it into a string using itoa and then reverse that,
If you really want to use strings, you can use sprintf to do what itoa does.
int k = 12345; char str[40]; sprintf(str,"%d",k);
Then reverse the string and convert it back to int using atoi or sscanf.