选择题 以下叙述中错误的是______。
选择题 某二叉树有5个度为2的节点,则该二叉树中的叶子节点数是______。
选择题 有如下程序:
#include <stdio.h>
struct pair
{ int first,second;};
struct pair get_min_max(int *array,int len)
{ int i;
struct pair res;
res.first=array[0];
res.second=array[0];
for(i=1;i<len;i++)
{ if(array[i]<res.first)res.first=array[i];
if(array[i]>res.second) res.seeond=array[i];
}
return res;
}
main()
{ int array[6]={19,21,3,4};
struct pair min_max=get_min_max(array,6);
printf('min=%d,max=%d\n',min_max.first,min_max.second);
}
程序运行后的输出结果是
选择题 对于循环队列,下列叙述中正确的是______。
选择题 以下选项中不能作为C语言合法常量的是______。
选择题 若有以下程序:
#include <stdio.h>
int a=2;
int f(int m)
{ static int n;
n=0; n++; a++;
return n+m+a;
}
main()
{ int k;
for(k=0;k<4;k++) printf('%d,',f(k));
}
则程序的输出结果是______。
选择题 以下选项中可用作C程序合法实数的是______。
选择题 有以下程序:
#include<stdio.h>
void fun(double x,double *y,double *z)
{*y=*y-1.0;*z=*z+x;}
main()
{ double a=2.5,b=9.0,*pa,*pb;
pa=a;pb=b;
fun(b-a,pa,pb);
printf('%f\n',a);
}
程序运行后的输出结果是______。
选择题 设有一联合体变量定义如下:
union data
{ long a;
float b;
int c;
char d;
};
union data x;
执行下列语句后,正确的联合体变量x的值是______。
x.a=111111;
x.b=2222;
x.c=2.1546;
x.d='R';
选择题 以下叙述中错误的是______。
选择题 以下叙述中正确的是______。
选择题 若有以下函数首部
int fun(double x[10],int*n)
则下面针对此函数的函数声明语句中正确的是______。
选择题 有以下程序:
#include <stdio.h>
#include <stdlib.h>
void fun(int*p1, int *s)
{ int *t;
t=(int *)malloc(2 * sizeof(int));
*t=*p1 + *p1 ++;
*(t+1)=*p1+ *p1;
s=t;
}
main()
{
int a[2]={1,2},b[2]={0};
fun(a,b);
printf('%d,%d\n',b[0],b[1]);
}
程序运行后的输出结果是______。
选择题 以下叙述中错误的是______。
选择题某系统结构图如下图所示:该系统结构图中最大扇入是______。
选择题 下面不能作为结构化方法软件需求分析工具的是______。
选择题 有以下程序:
#include <stdio.h>
main( )
{
int x = 0x13;
printf('INT:%d\n', x+1);
程序运行后的输出结果是______。
选择题 表达式a+=a-=a=9的值是______。
选择题 一个栈的初始状态为空。现将元素1、2、3、4、5、A、B、C、D、E依次入栈,然后再依次出栈,则元素出栈的顺序是______。
选择题 有以下程序:
#include <stdio.h>
int sum(int* array,int len)
if(len==1) return array[1];
else return array[1]+sum(array+1,len-1);
}
main()
{ int array[5]={0,9,1,2},res;
res=sum(array,3);
printf('%d\n',res);
}
程序运行后的输出结果是______