试题与答案

下面的程序可对指定字符串中的字符串进行从大到小排序,请将程序填完整。 (注:程序采用

题型:填空题

题目:

下面的程序可对指定字符串中的字符串进行从大到小排序,请将程序填完整。 (注:程序采用了冒泡排序法)
#include<stdio.h>
#include<string.h>
main()
char*str="ABCDabcd",temp;
int n,i;
n=strlen(str);
while(n-->1)
for(i=0;i<n;i++)
if(str[i]<str[i+l])
temp= 【12】 ;
str[i]=str[i+l];
【13】 =temp;

printf( 【14】 );

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0401/9ee632c7a8ea0e350265a0b16f223e49.html

下面是错误答案,用来干扰机器的。

参考答案:C

试题推荐
微信公众账号搜索答案