06 2021 档案

摘要:#include <stdio.h> #include <string.h> #define MSG "woshishuya" int main() { char arr_str[] = MSG; char * pt_str = MSG; printf("1.数组的pointer:%p\n", ar 阅读全文
posted @ 2021-06-30 14:03 学而不思则罔! 阅读(606) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> void print_arr(int size,int arr[size]); int main() { int i_arr[10] = { 1, 2, 3, 4, 5, 6, 6, 8, 9, 10 }; print_arr(10,i_arr); //匿名数组 阅读全文
posted @ 2021-06-29 18:36 学而不思则罔! 阅读(36) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> void print_arr(int size,int arr[size]); int main() { int i_arr[10] = { 1, 2, 3, 4, 5, 6, 6, 8, 9, 10 }; print_arr(10,i_arr); return 阅读全文
posted @ 2021-06-29 17:21 学而不思则罔! 阅读(110) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> void print_arr(int (* pt)[2] ,int size); void print_pointer(int (* pt)[2] ,int size); int main() { int t_arr[4][2] = { { 1, 200 }, 阅读全文
posted @ 2021-06-29 17:00 学而不思则罔! 阅读(116) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> int main() { int t_arr[4][2] = { { 1, 2 }, { 3, 4 }, { 5, 6 }, { 7,8 } }; int o_arr[4] = { 1, 2, 3, 4 }; //获取元素值 printf("数组表示法-[3][ 阅读全文
posted @ 2021-06-29 16:23 学而不思则罔! 阅读(514) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> void getsum(int pt[],int size ); void getsum1(int * head,int * tail ); int main() { int i_arr[5] = { 1, 20, 3, 4, 5 }; int *pt; get 阅读全文
posted @ 2021-06-29 11:14 学而不思则罔! 阅读(151) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> unsigned int Loop_Fibonacci(unsigned int n); unsigned int Recu_Fibonacci(unsigned int n); int main() { //给定正整数n(项数),返回响应的斐波那契数值 //斐 阅读全文
posted @ 2021-06-28 11:15 学而不思则罔! 阅读(92) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> int to_binary(int a); int main() { //求一个整数(十进制)的二进制(循环语句版) int a = 1234; int result; int shang; int size; int re; int b = a; int c 阅读全文
posted @ 2021-06-25 20:18 学而不思则罔! 阅读(193) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> long fact(int a); //计算指定参数的阶乘 int main() { //用循环求a的阶乘(注意输入参数不要超过12,会超过long的范围) int a = 4; long resutl = 1; for (int i = 1; i <= a; 阅读全文
posted @ 2021-06-25 20:06 学而不思则罔! 阅读(221) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示