全部知识点
第6741题
若有定义:
char c='\010';
则变量C中包含的字符个数为_____。
第6742题
逗号表达式(a=3*5,a*4),a+5的值为_____。
第6743题
若char w,int x,float y,double z;则表达式w*x+z-y的结果为_____类型。
第6744题
设x=4<4-!0,x的值为_____。
第6745题
C语言表达式!(4>=6)&&(3<=7)的值是_____。
第6746题
当a=1,b=2,c=3时,执行以下程序段后c=_____。
if(a>c) b=a; a=c; c=b;
第6747题
已知i=5,写出语句a=(i>5)?0:1;执行后整型变量a的值是_____。
第6748题
若输入字符串:abcde<回车>,则以下while循环体将执行_____次。
while((ch=getchar())=='e')
printf("*");
第6749题
执行语句char str[81]="abcdef";后,字符串str结束标志存储在str[_____](在括号内填写下标值)中。
第6750题
定义int a[2][3];表示数组a中的元素个数是_____个。
第6751题
如果函数不要求返回值,可用_____来定义函数为空类型。
第6752题
预处理命令行都必须以_____号开始。
第6753题
将数组a的首地址赋给指针变量p的语句是_____。
第6754题
设有以下共用体类型说明和变量定义,则变量c在内存所占字节数是_____。
union stud
{
short int num;
char name[10];
float score[5];
double ave;
}
c;
第6755题
功能:编写函数fun(int m)求1000以内(不包括1000)所有m的倍数之和。
#define N 1000
#include<stdio.h>
int fun(int m)
{
int s=0,i;
for(_____1_____)
if(_____2_____)
_____3_____
_____4_____
}
void TestFunc()
{
FILE *OUT;
int o;
OUT=fopen("out.dat","w");
if(OUT==NULL)
{
printf("Write File Error");
}
o = fun(6);
fprintf(OUT,"%d\n",o);
fclose(OUT);
}
void main()
{
int sum;
sum=fun(7);
printf("%d以内所有%d的倍数之和为:%d\n",N,7,sum);
TestFunc();
}
第6756题
功能:从低位开始取出长整型变量s中偶数位上的数,依次构成一个新数放在t中。
例如:当s中的数为:7654321时,t中的数为:642。
#include<stdio.h>
long fun(long s,long t)
{
long sl=10;
_____1_____
_____2_____
while(_____3_____)
{
_____4_____
_____5_____
_____6_____
}
return t;
}
void main()
{
long s, t,m;
void TestFunc();
printf("\nPlease enter s:");
scanf("%ld", &s);
m=fun(s,t);
printf("The result is: %ld\n", m);
TestFunc();
}
void TestFunc()
{
FILE *IN,*OUT;
int n;
long i,t,m;
IN=fopen("in.dat","r");
if(IN==NULL)
{
printf("Read File Error");
}
OUT=fopen("out.dat","w");
if(OUT==NULL)
{
printf("Write File Error");
}
for(n=0;n<5;n++)
{
fscanf(IN,"%ld",&i);
m=fun(i,t);
fprintf(OUT,"%ld\n",m);
}
fclose(IN);
fclose(OUT);
}
第6757题
一个C源程序中至少应包括一个_____函数。
第6758题
若有定义:
int a=10,b=9,c=8;
接着顺序执行下列语句后,变量c中的值是_____。
c=(a-=(b-5)); c=(a%11)+(b=3);
第6759题
若a是int型变量,则计算表达式a=25/3%3后a的值为_____。
第6760题
设(k=a=5,b=3,a*b),则k值为_____。