摘要:
001、没有返回值的函数 [root@PC1 test]# ls test.c [root@PC1 test]# cat test.c ## 测试c程序 #include <stdio.h> void put_star(int a) // 定义不含返回值的函数 { while(a-- > 0) pu 阅读全文
摘要:
001、方法1 while循环 [root@PC1 test]# ls test.c [root@PC1 test]# cat test.c ## 测试c程序 #include <stdio.h> int get_length(int a) { int length = 0; while(a > 0 阅读全文
摘要:
c语言中函数形参 -- 值传递,址传递,引用传递 阅读全文
摘要:
001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 abcd KHG DETT dre ssae rtE [root@PC1 test]# awk '{$1 = toupper(substr($1, 1, 1)) sub 阅读全文
摘要:
001、函数体内的变量名不可以和形参同名 a、 [root@PC1 test]# ls test.c [root@PC1 test]# cat test.c #include <stdio.h> int max(int a, int b) { int k = 100; return a > b ? 阅读全文
摘要:
001、 [root@PC1 test]# ls test.c [root@PC1 test]# cat test.c #include <stdio.h> int max(int a, int b) // 创建一个名为max的函数 { int k = 100; if(a > b) { return 阅读全文
摘要:
Hifi和ONT 有什么区别 阅读全文
摘要:
001、 [root@PC1 test]# ls test.c [root@PC1 test]# cat test.c ##测试c程序 #include <stdio.h> int main(void) { int i,j; i = j = 5; // 连续赋值 printf("i = %d\n", 阅读全文
摘要:
001、 [root@PC1 test]# ls test.c [root@PC1 test]# cat test.c ## 测试程序 #include <stdio.h> int main(void) { int var1 = 5; // 初始化一个变量var1 int array1[var1] 阅读全文
摘要:
001、一维数组 [root@PC1 test1]# ls test.c [root@PC1 test1]# cat test.c #include <stdio.h> int main(void) { int v1[5] = {3, 4, 8}; printf("length of v1 is % 阅读全文