单选题 若有定义:int a=7;float x=2.5,y=4.7;则表达式x+a%3*(int)(x+y)%2/4的值是( )。

A、 2.5
B、 2.75
C、 3.5
D、 0
下载APP答题
由4l***bs提供 分享 举报 纠错

相关试题

单选题 以下描述正确的是( )。

A、位运算的对象只能是整型或字符型数据
B、右移运算时,高位总是补0
C、左移运算的结果总是原操作数据2倍
D、位运算符都需要两个操作数

单选题 有以下程序 #include<stdio.h> void main() { char *s="ABC"; do { printf("%d",*s%10); s++; }while(*s); } 注意,字母A的ASCII码值为65。程序运行后的输出结果是( )

A、5670
B、656667
C、567
D、ABC

单选题 有以下程序 #include<stdio.h> int x=1; int f(int a) { static int x=2; int n=0; if(a%2) { static int x=3;n+=x++; } else { static int x=5;n+=x++; } return n+x++; } void main() { int sum=x,i; for(i=0;i<4;i++) sum+=f(i); printf("%d",sum); } 程序运行后的输出结果是( )。

A、35
B、36
C、31
D、33

单选题 以下程序的运行结果是( )。 #include <stdio.h> #include <string.h> void main() { char s1[100]="12345",s2[10]="678",s3[]="90"; strcat(strcpy(s1,s2),s3); puts(s1); }

A、12345678
B、1234590
C、90
D、67890

单选题 以下选项不正确的是( )。

A、a^=b 与 a=a^b 等价
B、a&=b 与 a=a&b 等价
C、a|=b 与 a=a|b 等价
D、a!=b 与 a=a!b 等价

单选题 有以下程序 #include <stdio.h> int f(int x) { int n; if(x==1) return 1; n = x+f(x-1); return (n); } void main() { printf("%d",f(5)); } 程序的输出结果是( )。

A、14
B、9
C、15
D、10

单选题 若函数调用时的实参为变量时,以下叙述中正确的是( )。

A、同名的实参和形参占同一存储单元
B、函数的形参和实参分别占用不同的存储单元
C、函数的实参和其对应的形参共占同一存储单元
D、形参只是形式上的存在,不占用具体存储单元

单选题 如果变量“int a=11,c=10;”,那么表达式(--a!=c++)?(--a):++c 的值是( )。

A、9
B、10
C、11
D、12