上一页 1 ··· 8 9 10 11 12 13 下一页
摘要: 1 #include<stdio.h> 2 #include<assert.h> 3 unsigned int mystrlen(char *str) 4 { 5 unsigned int len = 0; 6 assert(str != NULL);//断言:判断表达式一定为真,若为假,则终止程序 阅读全文
posted @ 2021-10-05 19:39 major825 阅读(56) 评论(0) 推荐(0)
摘要: 1 #include<stdio.h> 2 void sum(int num, int *x, int *y) 3 { 4 int flag = 0; 5 int i = 0; 6 *x = 0; 7 for(i = 0;i <= num; i = i+2)//变量的递增条件时i= i+2 8 { 阅读全文
posted @ 2021-10-05 17:39 major825 阅读(105) 评论(0) 推荐(0)
摘要: 1 #include<stdio.h> 2 void swap(int *x, int *y) 3 { 4 int temp = 0; 5 temp = *x; 6 *x = *y; 7 *y = temp; 8 return; 9 } 10 11 int main(int argc, const 阅读全文
posted @ 2021-10-05 15:15 major825 阅读(75) 评论(0) 推荐(0)
摘要: 1 #include<stdio.h> 2 int input_data(int *p,int len)//从键盘输入数据到数组 3 { 4 int i = 0; 5 for(i = 0; i < len; i++) 6 { 7 scanf("%d", &p[i]); 8 } 9 return 0; 阅读全文
posted @ 2021-10-05 15:02 major825 阅读(83) 评论(0) 推荐(0)
摘要: 1 #include<stdio.h> 2 int input_data(int *p,int len)//从键盘输入10个数据 3 { 4 int i = 0; 5 for(i = 0; i < len; i++) 6 { 7 scanf("%d", &p[i]); 8 } 9 return 0; 阅读全文
posted @ 2021-10-05 12:09 major825 阅读(105) 评论(0) 推荐(0)
摘要: #include<stdio.h>char *fun1(char *p){ printf("%s\n", p); return p;}char *fun2(char *p){ printf("%s\n", p); return p;}char *fun3(char *p){ printf("%s\n 阅读全文
posted @ 2021-10-04 23:48 major825 阅读(82) 评论(0) 推荐(0)
摘要: 1 #include<stdio.h> 2 char *fun1(char *p) 3 { 4 printf("%s\n", p); 5 return p; 6 } 7 char *fun2(char *p) 8 { 9 printf("%s\n", p); 10 return p; 11 } 12 阅读全文
posted @ 2021-10-04 23:22 major825 阅读(32) 评论(0) 推荐(0)
摘要: 1 #include<stdio.h> 2 int ADD(int a,int b ) 3 { 4 return a + b; 5 } 6 int SUB(int a,int b ) 7 { 8 return a - b; 9 } 10 int MUL(int a,int b ) 11 { 12 r 阅读全文
posted @ 2021-10-04 22:39 major825 阅读(110) 评论(0) 推荐(0)
摘要: 1 #include<stdio.h> 2 int add(int a,int b ) 3 { 4 return a + b; 5 } 6 int sub(int a,int b ) 7 { 8 return a - b; 9 } 10 int mul(int a,int b ) 11 { 12 r 阅读全文
posted @ 2021-10-04 22:15 major825 阅读(131) 评论(0) 推荐(0)
摘要: 1 #include<stdio.h> 2 char **design_array()//这个函数定义了一个指针,就可以返回数组名 3 { 4 static char a[] = {"beijing"};//此时的a在函数内定义的局部变量,需要做为返回值,必须加static 5 static cha 阅读全文
posted @ 2021-10-04 20:29 major825 阅读(100) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 下一页