摘要: #include<stdio.h> void f1(int b){ b=10;}void f2(int *c){ *c=10;}int main(){ int *p;//p是int *类型的,用来存放int类型变量的地址 int a=2; p=&a;//p指向a *p=3;//*p等价于a f1(a 阅读全文
posted @ 2022-01-24 15:47 城北徐公135 阅读(35) 评论(0) 推荐(0)
摘要: #include<stdio.h>//冒泡排序 int main(){ int a[5]={89,34,-56,1,23}; int len=5;// for(int k=0;k<len-1;++k)// {// for(int i=0;i<len-k-1;++i){// if(a[i]>a[i+1 阅读全文
posted @ 2022-01-24 10:41 城北徐公135 阅读(34) 评论(0) 推荐(0)
摘要: #include<stdio.h>int main(){ //1.定义数组// int a[2*2];// int b =2;// int c[2*b];//b是变量 []里面只能放整型常量 或常量表达式error const int b=2; int c[2*b]; //int e[3.1] er 阅读全文
posted @ 2022-01-24 09:07 城北徐公135 阅读(168) 评论(0) 推荐(0)