发布时间:2026-07-21阅读(1)
任何程序员都应该保持一个良好的编码习惯,以便于以后的维护
常见的命名方式分别有
驼峰命名法、匈牙利命名法、帕斯卡命名法和下划线命名法,其中前三种是较为流行的命名法
int main(){char ch = h;short sh = 5;int n = 10;float lf = 3.14f;double dbl = 9.65000;long l = 1016;long long ll = 10647;__int32 i32 = 45;__int64 i64 = 8963210;printf("ch = %c and siezof = %d\r\n", ch,sizeof(ch));printf("sh = %d and sizeof = %d\r\n",sh,sizeof(sh));printf("n = %d and sizeof = %d\r\n", n, sizeof(n));printf("lf = %lf and sizeof = %d\r\n", lf, sizeof(lf));printf("dbl = %f and sizeof = %d\r\n", dbl, sizeof(dbl));printf("l = %d and sizeof = %d\r\n", l, sizeof(l));printf("ll = %lld and sizeof = %d\r\n", ll, sizeof(ll));printf("i32 = %d and sizeof = %d\r\n", i32, sizeof(i32));printf("i64 = %I64d and sizeof = %d\r\n", i64, sizeof(i64));return 0;}

程序运行结果
printf可以留着明天学啦。
Copyright © 2024 有趣生活 All Rights Reserve吉ICP备19000289号-5 TXT地图HTML地图XML地图