选择题 下列叙述中正确的是______。
选择题 有以下程序
#include<stdio.h>
void swap(char*x,char*y)
{char t;
t=*x; *x=*y; *y=t;
}
main()
{char *s1='abc', *s2='123';
swap(s1,s2);printf('%s,%s\n',s1,s2);
}
程序执行后的输出结果是______。
选择题 以下程序的输出结果是______。
#include <stdio.h>
void prt (int *x,int *y,int *z)
{printf('%d,%d,%d\n',++*x,++*y,*(z++));}
main()
{int a=10,b=40,c=20;
prt (a,b,c);
prt (a,b,c);}
选择题 有如下程序:
#include <stdio.h>
void convert(char ch)
{
if(eh<'X') convert(ch+1);
printf('%c', ch);
main( )
{
convert('W');
printf('\n');
}
程序运行后的输出结果是______。
选择题 有以下程序
#include<stdio.h>
main()
{ int i,s=0,t[]={1,2,3,4,5,6,7,8,9};
for(i=0;i<9;i+=2)s+=*(t+i);
printf('%d\n',s);
}
程序执行后的输出结果是______。
选择题 C语言中double类型数据所占字节数为______。
选择题 以下选项中,能用作数据常量的是______。
选择题 设有如下函数定义
#include <stdio.h>
int fun(int k]
{ if(k<1) return 0;
else if(k==1) return 1;
else return fun(k-1)+1;
}
若执行调用语句“n=fun(3);”,则函数fun总共被调用的次数是______。
选择题 若有定义语句:int a=3,b=2,c=1;,以下选项中错误的赋值表达式是______。
选择题 有以下结构体说明、变量定义和赋值语句
struct STD
{ char name[10];
int age;
char sex;
} s[5],*ps;
ps=s[0];
则以下scanf函数调用语句有错误的是______。
选择题 以下选项中,仅当x的绝对值在1~6时,表达式值为“真”的是______。
选择题 有以下程序:
#include<stdio.h>
main()
{int aa[3][3]={{2}, {4}, {6}}, i, *p=aa[0][0];
for(i=0; i<2; i++)
{ if(i==0)aa[i][i+1]=*p+1;
else++p;
printf('%d', *p);
}
printf('\n');
}
程序的输出结果是______
选择题 设w、x、y、z、m均为int型变量,有以下程序段:
w=1; x=2; y=3; z=4;
m=(w<x)?w:x; m=(m<y)?m:y; m=(m<z)?m:z;
则该程序运行后,m的值是______。
选择题 下列叙述中错误的是______。
选择题程序中已构成如下图所示的不带头结点的单向链表结构,指针变量s、p、q均已正确定义,并用于指向链表结点,指针变量s总是作为指针指向链表的第一个结点。若有以下程序段:q=s;s=s->next;p=s;while(p->next)p=p->next;p->next=q;q->next=NULL;该程序段实现的功能是______。
选择题 下列说法中,不属于数据模型所描述的内容的是 。
选择题 有以下程序:
#include <stdio.h>
main( )
{
int a=3;
a+=a-=a*a;
printf('%d\n',a);
}
程序的输出结果是______。
选择题 有以下定义语句,编译时会出现编译错误的是______。
选择题 有以下程序:
#include<stdio.h>
main()
{
if('\0'==0)putchar('1');
if('0'==0)putchar('2');
if('a'>'b')putchar('3');
}
程序运行后的输出结果是______。
选择题 C语言中的标识符分为关键字、预定义标识符和用户标识符,以下叙述正确的是______。
