摘要:
实参的调用顺序有两种:自右向左,自左向右 实例: #include<stdio.h>#include<math.h>//实参的调用顺序int main(){ int f(int a,int b); int i = 2, p; p = f(i,++i); printf("%d\n",p); while 阅读全文
摘要:
#include<stdio.h>#include<math.h>//数组作为参数被调用void test(int v);void test2(int b[10]);int main(){ int a[] = {1,2,3,4,5,-1,-2,-3,4}; //第一类 int i; for (i = 阅读全文
摘要:
#include<stdio.h> #include<math.h>//函数的调用方式:自右向左int main(){ int f(int a, int b); int i = 2, p; p = f(i, ++i); //关键点 printf("%d\n", p); while (1); retu 阅读全文
摘要:
#include<stdio.h>#include<math.h>//二分法void main(){ int a[10] = {-12,0,6,16,23,56,80,100,110,115}; int c; int low = 0; int high = 9; int mid; int flag= 阅读全文
摘要:
#include<stdio.h>#include<math.h>//二维数组的初始化void main(){ int a[3][4] = {4,5,6}; int b[3][4] = { {4},{5},{6}}; for (int i = 0; i < 3; i++) { for (int j 阅读全文
摘要:
#include<stdio.h>#include<math.h>//冒泡法排序void main(){ int a[7] = {4,5,6,7,9,2,1}; int temp; for (int j = 0; j < 7; j++) { for (int i = 0; i < 6-j; i++) 阅读全文