#include<iostream>using namespace std;int *findmax(int *array,int size,int *index);void main(){int a[]={33,23,78,99,54,45,76,12,90};int *maxaddr;int idx;maxaddr=findmax(a,sizeof(a)/sizeof(*a),&idx);cout<<"the index of maximum element is"<<idx<<endl;cout<<"the address of is"<<maxaddr<<endl;cout<<"the valve of is"<<a[idx]<<endl;}
- 2 回答
- 0 關注
- 550 瀏覽
添加回答
舉報
0/150
提交
取消