Re : delete the second character of a string?
thanks but, this is not enough,
In my program, sNumis eqaul to "64" for example(a numeric value).
sNum is a variable; that means it's gonna change during the execution. So I only can declare the variable sNum at the beginning of my program. I can't declare it as you did below. (sNum[0]='b' and sNum[1]='o').
main()
{
char sNum[1],res;
/*sNum = "bo"*/
sNum[0]='b';
sNum[1]='o';
/* res is the second character of sNum*/
res=sNum[1];
}
|