有以下程序
#include
struct ord
{ int x,y;}dt[2]={1,2,3,4};
main()
{
struct ord *p=dt;
printf("%d,",++(p->x)); printf("%d\n",++(p->y));
}
程序运行后的输出结果是()。
A. 1,2
B. 4,1
C. 3,4
D. 2,3
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e0346502.html
点击查看答案
以下语句中存在语法错误的是()。
A. char ss[6][20];ss[1]= "right? ";
B. char ss[][20]={ "right? "};
C. char *ss[6];ss[1]= "right? ";
D. char *ss[]={"right? "};
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e034650a.html
点击查看答案
以下叙述中错误的是()。
A. C程序中的#include和#define行均不是C语句
B. 除逗号运算符外,赋值运算符的优先级最低
C. C程序中,j++;是赋值语句
D. C程序中,+、-、*、/、%号是算术运算符,可用于整型和实型数的运算
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346504.html
点击查看答案
有以下程序
#include "stdio.h"
void main()
{ int a=1, b=3, c=5;
int *p1=&a, *p2=&b, *p=&c;
*p =*p1*(*p2);
printf("%d\n",c);
}
执行后的输出结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6c48-c089-2897e034650f.html
点击查看答案
C语言中数组下标的下限是()。
A. 1
B. 0
C. 视具体情况而定
D. 无固定下限
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e0346518.html
点击查看答案
有以下程序
#include
main()
{int a=2,b;
b=a<<2; printf(“%d\n”,b);
}
程序运行后的输出结果是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e0346516.html
点击查看答案
有以下程序
#include
void num()
{ extern int x,y;
int a=15,b=10;
x=a-b;
y=a+b;
}
int x,y;
main()
{ int a=7,b=5;
x=a-b;
y=a+b;
num();
printf("%d,%d\n",x,y);
}
执行后的输出结果是( )。
A. 12,2
B. 5,25
C. 1,12
D. 输出不确定
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e034651b.html
点击查看答案
设有以下语句
int a=1,b=2,c;
c=a^(b<<2);
执行后,C的值为()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346501.html
点击查看答案
执行下列程序后,i的值是()。
int i,x;
for(i=1,x=1;i<20; i++)
{if (x>=10) break;
if(x%2= =1)
{x+=5; continue; }
x-=3;
}
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346521.html
点击查看答案
有以下程序
#include "stdio.h"
void main()
{ int c;
while((c=getchar())!='\n')
switch(c -'2')
{ case 0:
case 1: putchar(c+4);
case 2: putchar(c+4);break;
case 3: putchar(c+3);
default: putchar(c+2);break;
}
printf("\n");
}
通过键盘输入446755,执行后的输出结果是( )。
A. 888988
B. 668966
C. 88898787
D. 66898787
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6c48-c089-2897e0346508.html
点击查看答案