Answer:
int second_to_last = (number/10)%10;
int third_to_last = (number/100)%10;
Explanation:
The first expression int second_to_last = (number/10)%10; first divide the number by ten and then get modulus by dividing by ten again which will then give the second to last digit.
Assuming number is 146 the second to last digit will be 4.
for the second expression int third_to_last = (number/100)%10; first divide the number by hundred and then get modulus by dividing by ten which will then give the third to last digit.
Assuming number is 4368 the third to last digit will be 3.