im programming to be able to enter two digits, and these two digits need to be read from the back in... I'm supposed to use pointers, but i worked on this thing for 12 hours straight with no progress on the pointers. >.< this stuff makes me wanna kill myself, but i did some research and found (sort of) a way around it through establishments of a new array but it is still flawed when running. WIthout just telling me an answer, could an experienced helpful individual assist me in the right direction as far as how i could use a pointer to make this algorithim work, or perhaps just give me some pointers on how to make the backwards loop run correctly?
So you take two array of characters that the user input lines 8 and 10, then how could you compare the last digits of each one?? i tried to mess with using pointers (*rear1 = strlen(temp1)-1; rear2 = strlen(temp2)-1) and then tried to make a for loop that runs through both of them for comparison but i couldnt make it work my program would go bezerk. so i attempted with this algorithm and no pointers, but it only works properly if the lengths of the two are equal. If temp1 is larger than temp2 or vis versa, it will only compare the last two digits. >.<