摘要: /** 只读变量和常量 const 只读 const int a; int const a;//同上面的代码行是等价的,都表示一个常整形数。 int *const a;//const具有"左结合"性,即const修饰*,那么,不难理解,该句表示一个指向整数的常指针,a指向的整数可以修改,但指针a不能修改。 const int *a;//与下面的这一行等价,根据"左结合"性,const修饰的是(... 阅读全文
posted @ 2018-02-24 18:06 王默默 阅读(2372) 评论(0) 推荐(0) 编辑
摘要: 案例一:#include int main(void){ int a[5]; printf("please input sort number:"); int k; for(k=0;ka[j+1]){ //大的放后面 int temp; temp = a[j]; a[j] = a[j+1];//放最小的 a[j+1] = temp; ... 阅读全文
posted @ 2018-02-24 11:26 王默默 阅读(1276) 评论(0) 推荐(0) 编辑