网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
15、若有以下定义,则表达式“a * b + d – c”的值的类型为 #include <stdio.h> int main() { char a; int b; float c; double d; .... return 0; }
A.double
B.int
C.float
D.char
参考答案和解析
C
更多 “15、若有以下定义,则表达式“a * b + d – c”的值的类型为 #include <stdio.h> int main() { char a; int b; float c; double d; .... return 0; }A.doubleB.intC.floatD.char” 相关考题
考题
阅读下面程序段,则执行后输出的结果是#include "stdio.h"main(){ char fun(char,int);char a=′A′;int b=13;a=fun(a,b);putchar(a);}char fun(char a,int b){char k;k=a+b;return k;}A.AB.MC.ND.L
考题
若有以下程序段: include using namespace std; int main() {char*p="abcdefgh",*r;l
若有以下程序段:include <iostream>using namespace std;int main(){char*p="abcdefgh",*r;long*q;q=(long*)p;q++;r=(char*)q;cout<<r<<end1;return 0;}该程序的输出结果是【 】。
考题
阅读下面程序,则程序执行后的结果为#include "stdio.h"main(){int a=4,b=6,c=7;double d,fun(int,int,int);d=fun(a,b,c);printf("%lf\n",d);}double fun(int a,int b,int c){double s;s=a%b*c;return s;}A.27B.27.000000C.28D.28.000000
考题
若主调用函数类型为double,被调用函数定义中没有进行函数类型说明,而return语句中的表达式类型为float型,则被调函数返回值的类型是()。A.int型B.float型C.double型D.由系统当时的情况而定
考题
分析以下程序执行结果【】。 include int f (int x, int y){return x,y; } double f (d
分析以下程序执行结果【 】。include<iostream.h>int f (int x, int y){return x,y;}double f (double x, double y) {return x,y;}void main() {int a=4, b=6;double c=2.6, d=7.4;cout<<f (a, b) <<","<<f (c, d) <<end1;}
考题
若有以下定义: char a: int b; float c; double d; 则表达式a*b+d c的值的类型为 ______。A.floatB.intC.charD.double
考题
有以下程序 include int fun(char s[]) { int n=O; whil
有以下程序 #include <stdio.h> int fun(char s[]) { int n=O; while(*s<='9'*s>='0') { n=10*n+*s-'0'; s++; } return (n); } main() { char s[10]={ '6', '1', '*', '4', '*', '9', '*', '0', '*'}; printf("%d\n",fun(s)); }A.9B.61490C.61D.5
考题
若有以下程序:include using namespace std;int f(){static int i = 0;int s = 1;s+=
若有以下程序: #include <iostream> using namespace std; int f() { static int i = 0; int s = 1; s+=i; i++; return s; } int main() { int i,a = 0; for(i = 0;i<5;i++) a+=f(); cout<<a<<endl; return 0; } 程序运行后,输出的结果是A.20B.24C.25D.15
考题
有以下程序:includeint a=2;int f(int *a){return (*a) ++;}main(){ int s=0;{ int a=
有以下程序: #include <stdio.h> int a=2; int f(int *a) { return (*a) ++;} main() { int s=0; { int a=5; s+=f(a); } s+=f(a); printf("%d\n",s) } 执行后的输出结果是( )。A.10B.9C.7D.8
考题
以下程序的输出结果是【】。 include main() {struct stru {int a; float b; char d[4]; }
以下程序的输出结果是【 】。include<stdio.h>main(){ struct stru{ int a;float b;char d[4];};printf("%d\n",sizeof(struct stru));}
考题
若有以下定义: char a;int b; float c;double d; 则表达式a*b+b-c值的类型为( )。A. floatSX
若有以下定义: char a;int b; float c;double d; 则表达式a*b+b-c值的类型为( )。A. floatB.intC.charD.double
考题
有以下程序 include int fun(int a, int b) { if(b==0) return a;
有以下程序 #include <stdio.h> int fun(int a, int b) { if(b==0) return a; else return(fun(-a,-b)); } main() { printf("%d\n",fun(4,2)); } 程序的运行结果是______。A.1B.2C.3D.4
考题
若有以下程序: include using namespace std; int main() {char str[10];cin>>str;co
若有以下程序:include <iostream>using namespace std;int main(){char str[10];cin>>str;cout<< str<<end1;return 0;}当输入为:This is a program!那么执行程序后的输出结果是【 】。
考题
设有以下变量定义,并已赋确定的值: char w; int x; float y; double z; 则表达式:w*x+z-y所求得的数据类型为( )。A.charB.intC.floatD.double
考题
若有以下定义:char a;int b;float c;double d;则表达式a*b+d-c值的类型为( )。A.A. float SXB
若有以下定义:char a;int b;float c;double d;则表达式a*b+d-c值的类型为( )。A.A. floatB.intC.charD.double
考题
已知程序中已经定义了函数test,其原型是int test(int, int, int);,则下列重载形式中正确的是A.char test(int,int,int);B.double test(int,int,double);C.int test(int,int,int=0);D.float test(int,int,float=3.5F);
考题
单选题若有说明:char w; int x; float y; double z; 则表达式w*x+y-z的值的数据类型是()。A
doubleB
charC
intD
float
热门标签
最新试卷