Well, it's good to have this heart to study. To learn c, you have to drill these dead ends.
Let me explain something to you. Here you define an integer and give it an octal number, 024. When you output, it is 10, so the final result is 20, not 2 1 as you said.