填空题
下面程序的功能是将字符数组a中下标值为偶数的元素从小到大排列,其他元素不变,请填空。
#include<iostream.h>
#include<string.h>
void main( )
{ char a[ ]="clanguage",t;
int i,j,k;
k=strlen(A) ;
for(i=;0 i < =k-2;i+=2=
for(j=i+2;j < =k; 【 】=
if (【 】)
{ t=a[i];a[i]=a[j];a[j]=t;}
cout < < a;
cout < < end1;=
【参考答案】
j+=2