相关题目
#include "stdio.h"
struct st
{ int x;
int *y;
}*p;
int s[]={30,20};
struct st a[]={1,&s[0],2,&s[1]};
void main()
{ p=a; printf("%d,",p->x);
printf("%d\n",++(*(++p)->y));
}
以下程序的输出结果为( )。
main( )
{ char s1[40]="country",s2[20]="side";
int i=0,j=0;
while(s1[i]!='\0') i++;
while(s2[j]!='\0') s1[i++]=s2[j++];
s1[i]=0;
printf("%s\n",s1);
}
函数调用语句:fseek(fp,-10L,2);的含义是( )。
已知函数fread的调用形式为fread(buffer,size,count,fp),其中buffer代表的是( )。
C语言中的文件类型只有( )。
设有以下程序段,则值为6的表达式是( )。
struct st { int n; struct st *next;};
static struct st a[3]={5,&a[1],7,&a[2],9,0 },*p;
p=&a[0];
设有以下定义,值为5的枚举常量是( )。
enum week{sun,mon=4,tue,wed,thu,fri,sat} w;
以下程序的输出结果为( )。
#define ADD(x) x*x
main( )
{ int a=4,b=6,c=7,d=ADD(a+b)*c;
printf("d=%d",d);
}
若运行时为变量x输入12,则以下程序的运行结果是 。
main()
{
int x,y;
scanf("%d",&x);
y=x>12?x+10:x-12;
printf("%d\n",y);
}
以下程序输出结果是 。
#include "stdio.h"
void f ();
main()
{int a;
for(a=1;a<=3;a++)
fun();
}
void fun()
{static int i=1;
i+=3;
printf("%2d",i);
}
