Table of Contents

Char to int

First possibility

char c;
//some input to c
int number;
number = c -'0';

Second possibility

char c[2];
c[1]=0;
//some input to c
number = atoi(c);