摘要: 练习10-1 #include <stdio.h> void adjust_point(int*n) { if (*n > 100) *n = 100; if (*n < 0) *n = 0; } int main() { int x; printf("请输入一个数:"); scanf("%d", 阅读全文
posted @ 2019-11-23 16:08 nightswatch-candle 阅读(1261) 评论(0) 推荐(0)
摘要: 练习9-1 /* 将字符串存储在数组中并显示(其2:初始化) */ #include <stdio.h> int main(void) { char str[] = "ABC\0DEF"; printf("字符串str为\"%s\"。\n", str); /* 显示 */ return 0; } 练 阅读全文
posted @ 2019-11-23 16:07 nightswatch-candle 阅读(2242) 评论(0) 推荐(1)