I am not exactly sure how to ask this question, but I'll do my best to explain:
(This is in relation to Project Euler #4)
I have a function that checks to see if a word is a palindrome, and it works fine for words. The only thing stopping me from solving #4 is either a way to change my function to work with integers, or to convert my integer from a string.
If I have a string with the word 'and' stored in it, it is essentially [a][n][d]['\0']
I can now work with these letters by string[0] etc...
So if I have a number like '257', is there a way where I can do something like number[0] = 3, thus changing the number to 357?
I need to be able to basically multiply one number by another, then be able to check each digit of the product individually.
Note: I'm aware there are other libraries or prewritten functions that can convert an integer to a string, but I would like to be able to do this operation on my own so I can understand the concept better. I've already figured out how to do basic functions which are readily available such as strcopy, strcompare, etc., but I wrote them all myself.