int length = 10; char len = length + '0'; printf("%c", len); This gave me : for 58 on the ascii chart not 10 that I wanted. The ascii chart ... ... <看更多>
Search
Search
int length = 10; char len = length + '0'; printf("%c", len); This gave me : for 58 on the ascii chart not 10 that I wanted. The ascii chart ... ... <看更多>
Instead of adding the decimal point by shuffling characters around, you could use integer arithmetic: char str[20]; unsigned int value = 105; sprintf(str, "%u.% ... ... <看更多>
假如我有一個字元陣列a,char a = ['1','2','3',''4,'5'];我要怎麼利用atoi轉換成全部都是int的另一個陣列int b = [1,2,3,4,5],atoi他 ... ... <看更多>