题目内容

编程:输入n和n 个字符串,按升序排序输出所有字符串(按ASCII码)要求使用比较交换方法进行排序。部分程序如下:#include #include #define N 100#define LEN 81void Sort(char str[] [LEN],int n);int main(void){int i,n;char str[N] [LEN];scanf("%d",&n);getchar();for(i=0;i0){}}}

查看答案
更多问题

编程:输入一个int范围内的十进制整数,输出其对应的二进制数。部分程序如下:#include#include#define N 40void DToB(int n, char str[]);int main(void){char str[N];int n;scanf("%d", &n);DToB(n, str);puts(str);return 0;}void DToB(int n, char str[]){int len = 0;while( n>0){len++;n /= 2;}str[len] = '\0';strrev(str);}

编程:输入正整数n(0 < n <= 10),然后输入n个字符串,输出字典序最大的字符串。部分程序如下:#include#include#define N 40int main(void){int i,n;char max[N] = "";char str[N];scanf("%d", &n);getchar();for(i = 1; i <= n; i++){gets(str);if( strcmp(str, max) > 0 )}puts(max);return 0;}

Which phrase shares the same meaning as the underlined one?It will be an exciting party, as we have prepared a variety of programmes.

A. much
B. all sorts of
C. kind of
D. sort of

Miss Linda Colam ()the honour of your presence at the Opening Ceremony of new company.

A. remains
B. renews
C. requests
D. requires

答案查题题库