2021年7月28日
摘要: 1 //指针 2 3 4 5 #include <stdio.h> 6 int main() 7 { 8 int num = 9; 9 int *ptr_num1 = &num; 10 11 //int *ptr_num2 = &ptr_num; //指针的地址 12 int **ptr_num2 阅读全文
posted @ 2021-07-28 11:30 Bytezero! 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 int main() 3 { 4 int num1 = 1024; 5 int num2 = 2048; 6 int *ptr1; 7 int *ptr2; 8 9 ptr1 = &num1; 10 ptr2 = &num2; 11 printf("nu 阅读全文
posted @ 2021-07-28 11:25 Bytezero! 阅读(56) 评论(0) 推荐(0) 编辑
摘要: 1 //打印数组的元素 2 3 4 #include <stdio.h> 5 int main() 6 { 7 8 //数组名就是数组的首地址 9 // double score[] = {69,43,56,48,52}; 10 // printf("数组的首地址:%p\t数组的首元素地址:%p\t 阅读全文
posted @ 2021-07-28 11:20 Bytezero! 阅读(488) 评论(0) 推荐(0) 编辑
摘要: 1 指针的 -- 2 3 #include <stdio.h> 4 int main() 5 { 6 int i; 7 double score[5] = {10,20,32,40,50}; 8 double *ptr_score; 9 ptr_score = &score[1]; // 20 10 阅读全文
posted @ 2021-07-28 11:15 Bytezero! 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 void main() 3 { 4 int array[]={20,30,40,50,60}; 5 //int *ptr_array; 6 int *ptr_array = array; 7 int i; 8 for(i = 0; i <5;i++) 9 阅读全文
posted @ 2021-07-28 11:10 Bytezero! 阅读(612) 评论(0) 推荐(0) 编辑
摘要: 1 //数组逆序 2 3 #include <stdio.h> 4 #define N 5 5 int main() 6 { 7 int array[N] = {21,69,85,55,89}; 8 int i; 9 int temp; 10 11 12 //for(i = 0; i< N /2; 阅读全文
posted @ 2021-07-28 11:09 Bytezero! 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 int main() 3 { 4 5 int nums[5][3] = {{10,20,30},{40,50,60},{70,80,90},{100,110,120},{130,140,150}}; 6 int i,j; 7 8 9 // int (*p 阅读全文
posted @ 2021-07-28 11:05 Bytezero! 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 int main() 3 { 4 5 int moneys[6]; 6 char unit[10][4] ={"零","壹","贰","叁","肆","伍","陆","柒","捌","玖"}; 7 int i =0; 8 int money,count 阅读全文
posted @ 2021-07-28 11:00 Bytezero! 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 1 //#include <stdio.h> 2 //#include <ctype.h> 3 //#include <math.h> 4 //#include <stdlib.h> 5 //#include <time.h> 6 7 //int main() 8 //{ 9 10 /* 11 // 阅读全文
posted @ 2021-07-28 10:55 Bytezero! 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <math.h> 4 //圆的面积 5 void calcCircle(); 6 //矩形的面积 7 void calcRectangle(); 8 //求1-100之间的偶数和 9 int 阅读全文
posted @ 2021-07-28 10:50 Bytezero! 阅读(34) 评论(0) 推荐(0) 编辑