5、int y=1, x, *p, a[ ]={2,4,6,8,10};   p=&a[1]; 5、int y=1, x, *p, a[ ]={2,4,6,8,10};  p=&a[1];  for(x=0;x

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/22 11:49:08
5、inty=1,x,*p,a[]={2,4,6,8,10};  p=&a[1]; 5、inty=1,x,*p,a[]={2,4,6,8,10};  p=&a[1];  for(x=0;x5、inty

5、int y=1, x, *p, a[ ]={2,4,6,8,10};   p=&a[1]; 5、int y=1, x, *p, a[ ]={2,4,6,8,10};  p=&a[1];  for(x=0;x
5、int y=1, x, *p, a[ ]={2,4,6,8,10};   p=&a[1];
 5、int y=1, x, *p, a[ ]={2,4,6,8,10};
  p=&a[1];
  for(x=0;x

5、int y=1, x, *p, a[ ]={2,4,6,8,10};   p=&a[1]; 5、int y=1, x, *p, a[ ]={2,4,6,8,10};  p=&a[1];  for(x=0;x
指针p指向a[1]的地址 a[1]是 4 数组下标从0开始
x=0 *(p+0) 就是 4 x=1 *(p+1) 指针向前移动一位 6 x=2 *(p+2) 向前移动2位 8
y = 1+4+6+8

#include void main( ) { int a=3,b=5; int *p,*q; void f1(int x,int y);void f2(int *x,int *y);p=&a; q=&b;f1(*p,*q) ;printf(a=%d ,b=%d ,a,b);f2(p,q);printf(a=%d ,b=%d ,a,b);}void f1(int x,int y) { int t;t=x; x=y; y=t;}void f2(int *x,int *y) { int void fun(int *a,int *b) { int *c; c=a;a=b;b=c; } main() { int x=3,y=5,*p=&x,*q=&y; fun(p,q);...void fun(int *a,int *b){ int *c; c=a;a=b;b=c;}main(){ int x=3,y=5,*p=&x,*q=&y; fun(p,q); printf(%d,%d,,*p,*q); fun(&x,&y); prin%d,%d ,*p,*q);}两 struct st{int x,int*y;}*p; int s[]={5,6,7,8} st a[]={10,&s[0],20,&s[1]30,&[2],40,&s[3]} main( ) {p=a;cout main(){int a[]={2,4,6,8,10};int y=1,x,*p;p=&a[1];for(x=0;x 这道题结果为什么是1,3,5而不是4,3,#include stdio.hmain(){int a[]={1,2,3,4,5};int x,y,*p;p=&a[0];x=*(p+2); y=*(p+4);printf(*p=%d,x=%d,y=%d ,*p,x,y);} void fun(int *a,int *b) { int *c; c=a;a=b;b=c; } main() { int x=3,y=5,*p=&x,*q=&y; fun(p,q);...void fun(int *a,int *b){int *c;c=a;a=b;b=c;}main(){int x=3,y=5,*p=&x,*q=&y;fun(p,q); printf(%d,%d,,*p,*q);fun(&x,&y); prin%d,%d ,*p,*q);}两次调用 #define p(x) x*x int x=5,y=3,z; z=p(x+y); A) 64 B) 23 C) 46 D) 32 主调函数中的两个变量a和b,要求调用函数交换a,b值,返回交换结果,则以下正确的函数是()a.funa(int *x,int *y){int *p;*p=*x;*x=*y;*y=*p;}b.funb(int x,int y){int t;t=x;x=y;y=t;}c.func(int *x,int *y){*x=*y;*y=*x;}d.fund(in 5、int y=1, x, *p, a[ ]={2,4,6,8,10};   p=&a[1]; 5、int y=1, x, *p, a[ ]={2,4,6,8,10};  p=&a[1];  for(x=0;x int a[3][3]={{1,2,3},{4,5,6},{7,8,9}}; int **p; p=(int**)a; 其中p=(int**)a;是什么意思啊 main() {int a[]={2,4,6,8,10},y=0,x,*p; p=&a[1]; for(x=1;x int y=1,x,*p,a[ ]={2,4,6,8,10}; p=&a[1]; for(x=0;x int func(int x,int y ) { return(x+y) } main() {int a=1,b=2,c=3,d=4,e=5;printf(&d ,func((a+b,b+c,c+a),(d+e))); 我想搞个X的Y次方的 算法 #include stdafx.hint main(int argc,char* argv[]){int pow(int x,int y);int a,b,c;scanf(%f,%f,&a,&b);c=pow(a,b);printf(%f ,c);return 0;}int pow(int x,int y){int i,z;i=1;z=x;while(i Int a=1; Int *p; p=&a; printf(“%d ”,*p); 和Int a=1; Int*p; *p=a; printf(“%d ”,*p); :::: C语言题目:有如下定义:int x[]={1,2,3},*p=x,y;则y=*p++;相当于:A.y=*(p+1),p=p+1B.y=1,x++C.y=2,p=x+1D.y=*p,p++ 下面语句错误的是(要详细分析的哦)A.int a=5;intx[a];B.const int a=5;int x[a];C.int n=5;int *p=new int[a];D.const int n=5;int *p=new int [a]; #include class base { Private:int x,y; public:void setxy(int a,int b){x=a;y=b;} void 分析下面程序的输出结果.#includeclass base{Private:int x,y;public:void setxy(int a,int b){x=a;y=b;}void show(base *p){cout