C語言怎么將longlong類型數字轉化成字符串?
代碼如下:
#include <stdio.h>#include <stdlib.h>int main(){ long long a = 0x7FFFFFFFFFFFFFFF; char buffer[100]; sprintf(buffer, "%lld", a); printf("%s\n", buffer); system("pause"); return 0;}
運行結果:
C語言怎么將longlong類型數字轉化成字符串?
代碼如下:
#include <stdio.h>#include <stdlib.h>int main(){ long long a = 0x7FFFFFFFFFFFFFFF; char buffer[100]; sprintf(buffer, "%lld", a); printf("%s\n", buffer); system("pause"); return 0;}
運行結果: