全部知识点

第6761题

在C语言中,格式输入操作是由库函数(只写函数名)_____完成的,格式输出操作是由库函数(只写函数名)_____完成的。

第6762题

x=5,y=8时,C语言表达式5-2>=x-1<=y-2的值是_____。

第6763题

当a=3,b=2,c=1时,执行以下程序段后b=_____。

if(a>b)
    a=b;
if(b>c)
    b=c;
else c=b;
c=a;
第6764题

设x=(5>1)+2,x的值为_____。

第6765题

程序段:

int k=10;
while(k=0)
    k=k-1;

循环体语句执行_____次。

第6766题

连接字符串的函数是_____,只写函数名即可。

第6767题

若有以下数组a,数组元素:a[0]~a[9],其值为9 4 12 8 2 10 7 5 1 3该数组的元素中,数值最小的元素的下标值是_____。

第6768题

函数的_____调用是一个函数直接或间接地调用它自身。

第6769题

预处理命令行都必须以_____号开始。

第6770题

在C程序中,只能给指针变量,NULL值和_____值。

第6771题

设有以下结构类型说明和变量定义,则变量b在内存所占字节数是_____。

struct stud {
    short int age;
    char num[3];
    float s[2];
    double ave;
}
b,*p;
第6772题

功能:编写函数求1~50(包括50)中奇数的平方和,结果为20825.000000。

#include<stdio.h>
float sum(int n)
{
    float s=0;
    int i;
    for(_____1_____)
        _____2_____
    _____3_____
}
void TestFunc()
{
    FILE *IN,*OUT;
    int i;
    float o;
    IN=fopen("in.dat","r");
    if(IN==NULL)
    {
        printf("Read File Error");
    }
    OUT=fopen("out.dat","w");
    if(OUT==NULL)
    {
        printf("Write File Error");
    }
    fscanf(IN,"%d",&i);
    o=sum(i);
    fprintf(OUT,"%f\n",o);
    fclose(IN);
    fclose(OUT);
}
void main()
{
    printf("sum=%f\n",sum(50));
    TestFunc();
}
第6773题

功能:判断一个整数w的各位数字平方之和能否被5整除,可以被5整除则返回1,否则返回0。

#include<stdio.h>
#include<conio.h>
int fun(int w)
{
    int k,s=0;
    do {
        _____1_____
        _____2_____
    }
    while(_____3_____)
        if(_____4_____)
            _____5_____
        else_____6_____
    return k;
}
void main()
{
    int m;
    void TestFunc();
    printf("Enter m: ");
    scanf("%d", &m);
    printf("\nThe result is %d\n", fun(m));
    TestFunc();
}
void TestFunc()
{
    FILE *IN,*OUT;
    int c ;
    int t;
    int o;
    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(c=1;c<=5;c++)
    {
        fscanf(IN,"%d",&t);
        o=fun(t);
        fprintf(OUT,"%d\n",o);
    }
    fclose(IN);
    fclose(OUT);
}
第6774题

一个C程序总是从_____开始执行。

第6775题
int x;
x=-3+4%-5*3;

则x的值为_____。

第6776题

设k=(a=2,b=3,a*b),则k的值为_____。

第6777题
int a=1,b=2,c=3;

执行语句a=b=c;后a的值是_____。

第6778题

以下程序的输出结果为_____。

#include<stdio.h>
void main()
{
    int a=010,j=10;
    printf("%d,%d\n",++a,j--);
}
第6779题

已知a=10,b=15,c=1,d=2,e=10,则表达式a++&&e++&&c++的值为_____。

第6780题

假设所有变量都为整型,表达式(a=2,b=5,a>b?a++:b++,a+b)的值是_____。