在下面程序横线处填上适当内容,使得程序的输出为9876。include <iostream>using namespace std;te
在下面程序横线处填上适当内容,使得程序的输出为9876。
include <iostream>
using namespace std;
template<class T>
void f(【 】)
{
T t;
for (int i=0;i<n/2;i++)
{
t=a Ii];
a [i]=a[n-1-i];
a [n-1-i]=t;
}
}
int main ()
{
int x[]={6,7,8,9};
f(x,4);
for (int i=0;i<4;i++)
cout<<x[i];
cout<<end1;
return 0;
}