Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - C language forces type conversion, from CHAR[] to plastic.
C language forces type conversion, from CHAR[] to plastic.
int a;

char arr 1[5]="9657 "

sscanf(arr 1," %d ",& ampa); //Read an integer from the array of arr 1 characters.

sprintf(arr 1," %d ",a+ 1); //Convert the value of a+ 1 into a string and save it in the array of arr 1.

/*

If the carry case is considered, the arr 1 array should be long enough to store the new characters generated by the carry.

*/