AI智能整理导入 AI智能整理导入
×
首页 题库中心 c语言程序设计题库 题目详情
CA85E835B92000012B50FB49F93816B5
c语言程序设计题库
1,073
单选题

若希望当A的值为奇数时, 表达式的值为“真”, A 的值为偶数时, 表达式的值为“假”。 则以下不能满足要求的表达式是( ) 。

A
!(A%2)
B
A % 2 ==1
C
!(A%2==0)
D
A%2

答案解析

正确答案:A

解析:

选择结构程序设计
c语言程序设计题库

扫码进入小程序
随时随地练习

相关题目

单选题

函数void fun(float *sn, int n)的功能是:根据以下公式计算S , 计算结果通过形参指针sn传回。要求n通过形参传入,n>=0 。请填空【1】。


void fun(float *sn, int n)
{
float s=0.0,w,f=-1.0;
int i=0;
for(i=0;i<=n;i++)
{
f =-1* f ;
w=f/(2*i+l);
s+=w;
}
【1】=s;
}

单选题

下列程序的运行结果是【1】
#include
#include
char *ss(char *s)
{
return s+strlen(s)/2;
}
void main()
{
char *p,*str="abcdefgh";
p=ss(str);
printf("%s\n",p);
}

单选题

函数gongyu()的作用是求整数num1和num2的最大公约数,并返回该值,请填空【1】。
gongyu(int num1, int num2)
(
int temp,a,b;
if(num1{
temp=num1;
num1=num2;
num2=temp;
}
a=num1;b=num2;
while(b!=0 )
{
【1】;a=b;b=temp;
}
return(a);
}

单选题

以下程序的运行结果是【1】
#include
#define N 10
#define S(x) x*x
#define F(x) (x*x)
void main()
{
int i1,i2;
i1=1000/S(N);
i2=1000/F(N);
printf("%d,%d\n",i1,i2);
}

单选题

以下程序的运行结果是【1】
#include
#define MAX(x,y) (x)>(y)?(x):(y)
void main()
{
int a=5,b=2,c=3,d=3,t;
t=MAX(a+b,c+d)*10;
printf("%d\n",t);
}

单选题

若有定义" int a[5]={10, 20, 30, 40, 50}, *p;p=&a[1];" , 则执行语句“*p++;"后*p 的值是【1】

单选题

阅读以下程序:
#indude
int main()
{
int a[10]={2,4,6,8,10,12,14,16,18,20},*p;
P=a;
printf("%x\n", p);
printf("%x\n", p+9);
return 0;
)
若第一个printf语句输出的是ffca ,则第二个printf语句输出的是【1】

单选题

以下程序的运行结果是【1】。
#include
void abc(char *p)
{
int i,j;
for(i=j=0;*(p+i)!='\0';i++)
if(*(p+i)>= 'd')
{
*(p+j)=*(p+i);
j++;
}
*(p+j)='\0';
}


void main()
{
char str[ ]="cdalb";
abc(str);
puts(str);
}

单选题

以下程序的运行结果是【1】。
#include
void main()
{
int x[5]={2,4,6,8,10},*p,**pp;
p=x;
pp=&p;
printf("%d",*(p++));
printf("%d\n",**pp);
}

单选题

以下程序的运行结果是【1】。
#include
#include
void main()
{
char *p1,*p2,str[50]="abc",st[50]="abc";
p1=st;
p2="abc";
strcpy(str+1, strcat(p1,p2));
printf("%s\n”,str);
}

关闭
专为自学备考人员打造
试题通
自助导入本地题库
试题通
多种刷题考试模式
试题通
本地离线答题搜题
试题通
扫码考试方便快捷
试题通
海量试题每日更新
试题通
欢迎登录试题通
可以使用以下方式扫码登陆
试题通
使用APP登录
试题通
使用微信登录
xiaochengxu
联系电话:
400-660-3606
xiaochengxu