我有这个代码(我正在使用ansi c中的大文件支持)
unsigned long int tmp,final
final=1231123123123213
tmp=final;
printf("%llu %llu \n",final,tmp);
printf("%llu \n ",tmp);
Run Code Online (Sandbox Code Playgroud)
它打印
1231123123123213 0
1231123123123213
Run Code Online (Sandbox Code Playgroud)
我不懂
与的格式说明符unsigned long int是%lu.您正在使用%llu,这是格式说明符unsigned long long int.代码的行为未定义.
你需要决定你想要做什么.使用正确的格式说明符(以匹配类型),或使用正确的类型(以匹配格式说明符).