C语言题库
提供C语言相关考试试题、历年真题、模拟试题和答案解析,支持在线查看与练习。
科目:
全部
最新收录试题
单选题
C语言
下列叙述中正确的是( )。
2013-08-15
收藏 1 次
简答题
C语言
学生的记录由学号和成绩组成,M名学生的数据已在主函数中放入结构体数组stu中,请编写函数proc(),其功能是:按分数的高低排列学生的记录,高分在前。
注意:部分源程序给出如下。
2013-08-15
收藏 2 次
简答题
C语言
给定程序中,函数proc()的功能是:使数组中的元素的值缩小5倍。
请修改程序中的错误,使它能得出正确的结果。
注意:不要改动main()函数,不得增行或删行,也不得更改程序的
2013-08-15
收藏 1 次
填空题
C语言
请补充main()函数,该函数的功能是:如果数组arr的前一个元素比后一个元素小,则把它保存在数组bb中并输出。
例如,若数组中的元素为:“40,68,62,33,35,52,4
2013-08-15
收藏 0 次
单选题
C语言
有以下程序:
#include<stdio.h>
main( )
{FILE*fp;char str[10];
fp=fopen("myfile,dat","
2013-08-13
收藏 3 次
单选题
C语言
有以下程序:
#include<stdio.h>
main( )
{int a=2,b=2,c=2;
print{("%d\n",a/b&c);
}
程
2013-08-13
收藏 0 次
单选题
C语言
有以下定义和语句:
struct workers
{int num;char name[20];char C;
struct
{i
2013-08-13
收藏 3 次
单选题
C语言
有以下程序:
#include<stdi0.h>
#include<string.h>
struct A
{int a;char b[10
2013-08-13
收藏 0 次
单选题
C语言
设有定义:
struet complex
{int real,unreal;)datal={1,8},data2;
则以下赋值语句中错误的是( )。
2013-08-13
收藏 0 次
单选题
C语言
有以下程序:
#include<stdio.h>
#define SUB(a)*(a)-(a)
main( )
{int a=2,b=3,c=5,d;
d=SU
2013-08-13
收藏 2 次
单选题
C语言
有以下程序:
#include<stdio.h>
int fun( )
{static int x=1;
X*=2;return X;
mai
2013-08-13
收藏 2 次
单选题
C语言
有以下程序:
#include<stdio.h>
int f(int t[],int n);
main( )
{int a[4]={1,2,3,4},s;
2013-08-13
收藏 1 次
单选题
C语言
有以下程序:
#include<stdio.h>
#define N 8
void fun(int*x,int i)
{*x=*(x+i);)
mai
2013-08-13
收藏 7 次
单选题
C语言
若有以下定义和语句:
char s [10]="abcd!",*s2="\nl23\\";
Printf("%d%d\n",strlen(sl),strlen(s2));
2013-08-13
收藏 1 次
单选题
C语言
有以下程序:
#include<stdio.h>
main( )
{int b[3][3]=(0,1,2,0,1,2,0,1,2},i,j,t=l;
for
2013-08-13
收藏 2 次
单选题
C语言
有以下程序:
#include<stdio.h>
main( )
{int a[5]={1,2,3,4,5),b[5]={0,2,1,3,o},i,s=0;
2013-08-13
收藏 2 次
单选题
C语言
设有定义"double a[10],*s=a;",以下能够代表数组元素a[3]的是( )。
2013-08-13
收藏 0 次
单选题
C语言
若有定义"int(*pt)[3];",则下列说法正确的是( )。
2013-08-13
收藏 2 次
单选题
C语言
有以下程序:
#include<stdio.h>
void fun(char*C,int d)
{*c=*c+1,d=d+1;
printf(%"
2013-08-13
收藏 4 次
单选题
C语言
下列选项中,能正确定义数组的语句是( )。
2013-08-13
收藏 2 次