Hi this is the easy and fast way if you have this case :
[QUICK Mode]
int concated;
char ABC[4]="";int a=1,b=4,c=2; //char[] Initializing
ABC<-sprintf(ABC,"%d%d%d",a,b,c); //without space between %d%d%d
printf("%s",ABC); //value as char[] is =142
concated=atoi(ABC); //result is 142 as int, not 1,4,2 (separeted)
//now use switch case on 142 as an integer and all possible cases
[EXPLAINED Mode]
for example :
i have many menus, each choice on the 1st menu takes u to the 2nd menu,
the same thing with the 2nd menu and the 3rd menu.but the Options are diferent
so you know that the user has choised finnaly.
exemple :
menu 1: 1 ==> menu 2: 4==> menu 3: 2 (...)the choice is 142. other cases : 111,141,131,122...
sollution:
store the first 1st in a,2nd in b,3rd on c. a=1, b=4, c=2
char ABC[4]="";
ABC<-sprintf(ABC,"%d%d%d",a,b,c); //without space between %d%d%d
printf("%s",ABC); //value as char[]=142
//now you want to recover your value(142) from char[] to int as int value 142
concated=atoi(ABC); //result is 142 as int, not 1,4,2 (separeted)