問題詳情
32)有以下程序#include void fun(int *a,int n)/*fun函数的功能是将a所指数组元素从大到小排序*/{ int t,i,j;for(i=0;i (B)0,9,8,7,6,5,1,2,3,4,
(C)0,9,8,7,6,5,4,3,2,1,
(D)1,2,3,4,9,8,7,6,5,0,
(C)0,9,8,7,6,5,4,3,2,1,
(D)1,2,3,4,9,8,7,6,5,0,
參考答案
答案:D
難度:適中0.5
統計:A(0),B(0),C(0),D(0),E(0)
內容推薦
- 18)若变量已正确定义,有以下程序段i=0;do printf("%d,",i);while(i++);printf("%dn",i);其输出结果是(
- 40)有以下程序#include void fun(char *t,char *s){ while(*t!=0) t++;while((*t++=*s++)!=0);}main(){ cha
- 31)有以下程序#include main(){ int s[12]={1,2,3,4,4,3,2,1,1,1,2,3},c[5]={0},i;for(i=0;i<12;i++) c[
- 21)有以下程序#include main0{ int y=9;for( ; y>0;y--)if(y%3==0) printf("%d",--y);}程序的运行结
- 17)有以下程序段int j;float y;char name[50];scanf("%2d%f%s",&j,&y,name);当执行上述程序段,从键盘上输入55566
- 39)阅读下列程序,则运行结果为#include "stdio.h"fun(){ static int x=5;x++;return x;}main(){ int i,x
- 30)有以下程序 #includemain(){FILE *fp; int i,a[6]={l,2,3,4,5,6};fp=fopen("ddat","w+
- 20)若有定义:float x=5;int a=1,b=3,c=2;,则正确的switch语句是(A)switch(x){case 0:printf("*n");
- 29)在16位IBM-PC机上使用C语言,若有如下定义struct data{ int i;char ch;double f;} b;则结构变量b占用内存的字节数是(A)1 (B)2 (C)
- 19)若变量已正确定义,有以下程序段int a=3,b=5,c=7;if(a>B)a=b; c=a;if(c!=A)c=b;printf("%d,%d,%dn",a
內容推薦
- 19)下列程序的运行结果是#include "stdio.h"main(){ int x=-9,y=5,z=8;if(x<y) if(y<0)z=0; els
- 23)有以下程序#include main(){ int a[ ]={1,2,3,4},y,*p=&a[3];--p; y=*p;printf("y=%dn",y);
- 33)下面程序的输出结果是#include#includemain(){ char *p1="abc",*p2="ABC",str[50]= &quo
- 20)若程序执行时的输入数据是"2473",则下述程序的输出结果是#includevoid main(){ int cs;while((cs=getchar())!=;
- 24)以下数组定义中错误的是(A)int x[][3]={0}; (B)int x[2][3]={{l,2},{3,4},{5,6}}; (C)int x[][3]={{l,2,3},{4,
- 34)以下函数返回a所指数组中最小的值所在的下标值fun(int *a, int n){ int i,j=0,p;p=j;for(i=j;i<n;i++) if(a[i](A)i=p(
- 21)以下程序的输出结果是main(){ int a,i;a=0;for(i=1;i<5;i++){ switch(i){ case 0:case 3:a+=2;case 1:case
- 13)以下对C语言函数的有关描述中,正确的是(A)在C语言中调用函数时,只能把实参的值传给形参,形参的值不能传送给实参(B)C函数既可以嵌套定义又可以递归调用(C)函数必须有返回值,否则不能
- 22)现有如下程序段#include "stdio.h"main(){ int k[30]={12,324,45,6,768,98,21,34,453,456};int
- 14)若函数调用时的实参为变量时,以下关于函数形参和实参的叙述中正确的是(A)函数的实参和其对应的形参共占同一存储单元 (B)形参只是形式上的存在,不占用具体存储单元(C)同名的实参和形参占
- 23)若有以下程序#include int a[]={2,4,6,8};main(){ int i;int *p=a;for(i=0;i<4;i++)a[i]=*p;printf(&q
- 24)有以下程序#include main(){ int i,j,m=55;for(i=1;i<=3;i++)for(j=3;j<=i;j++)m=m%j;printf(&quo
- 草花種植完成後,下列何者錯誤?(A)需馬上澆水(B)需馬上施尿素肥(C)根球裸露部分填補土方(D)草花周邊土方整平
- 25)已知字符′A′的ASCII码值是65,字符变量cl的值是′A′,c2 的值是′D′。执行语句printf("%d,%d",c1,c2-2);后,输出结果是(A)A,
- 26)下列程序是用来判断数组中特定元素的位置所在的。#include #include int fun(int *s, int t, int *k){ int i;*k=0;for(i=0;
- 34)设有定义:char p[]={′1′,′2′,′3′},*q=p;,以下不能计算出一个char型数据所占字节数的表达式是(A)sizeof(p) (B)sizeof(char) (C)
- twice(A)machine (B)invite (C)terrible (D)bitter
- 27)下面程序的文件名为t.exe,在DOS下输入的命令行参数为:t to meet me则程序输出的结果是#include "stdio.h"main(argc,arg
- doubt(A)amount (B)trouble (C)shoulder (D)group
- Jack,you seem in high spirits.--____________We won the match 4-0.(A)Guess what? (B)So what? (C)N
- I walked up to the top of the hill with my feiend, we enjoyed a splendid view of the lake(A)which
- north(A)thunder (B)worthy (C)neither (D)clothes
- 29)以下叙述中错误的是(A)改变函数形参的值,不会改变对应实参的值 (B)函数可以返回地址值(C)可以给指针变量赋一个整数作为地址值 (D)当在程序的开头包含头文件stdio.h时,可以给
- It is not how much we do but how much love we put into what we do______benefits our work most.(A)