to compare two integer values stored in char pointers

How can I compare two integer values which is stored in char pointers?

suppose I have char *a and char *b having values 10 and 20. how can i find the shorter value?

Have you tried the atoi() function?

Regards