Yes, your result is right.
int i = ((int)d / 10 ) % 10
First, d was converted integer type:214, then result is 21.4. Finally 21.4 % 10, 21.4 has coverted "21", so "21 % 10" equal to "1".
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.