hello,
i have 2 items on the screen
item 1 has a code tp01
item 2 has a code tp02
how do i do my switch case??
-------------------------
char item_code[10]
scanf("%s", item_code);
switch(item_code[10])
case 1: print....; break;
case 2: print....;break;
default:.....
----------
what am i doing wrong??? what do i need to change as i need the program to accept the item code not a single number or a single character but the item code!!give maximum details please!-