print(type(16/4))的结果为()A、intB、floatC、strD、bool

题目

print(type(16/4))的结果为()

  • A、int
  • B、float
  • C、str
  • D、bool

相似考题
参考答案和解析
正确答案:B
更多“print(type(16/4))的结果为()”相关问题
  • 第1题:

    ( 28 )有如下程序

    #include <iostream>

    using namespace std;

    class A {

    public:

    A(int i):rl(i) {}

    void print() {cout<<'e'<<r1<<'-';}

    void print() const {cout<<'C'<<rl*rl<<'-';}

    private:

    int rl;

    };

    int main(){

    A al(2); const A a2(4);

    Al.print();a2.print();

    Return 0;

    }

    运行时的输出结果是

    A )运行时出错

    B ) E2-C16-

    C ) C4-C16-

    D ) E2-E4-


    正确答案:B

  • 第2题:

    下面程序段执行结果为

    x=Int(Rnd() +4)

    Select Case x

    Case 5

    Print "excellent"

    Case 4

    Print "good"

    Case 3

    Print "pass"

    Case Else

    Print "fail"

    End Select

    A.excellent

    B.good

    C.pass

    D.fall


    正确答案:B
    解析:在Visual Basic中,组成变量名的英文字母不区分大小写,例Single和single是一样的,在定义了一个变量之后,只要字符相同,则不管它大小写是否相同,指的都是同一个变量。

  • 第3题:

    设当前日期为2008年4月28日,星期一,则执行下面语句后的输出结果为______。

    Print Day(Now)

    Print Month(Now)

    Print Year(Now)

    Print Weekday(Now)


    正确答案:28CR>4CR>2008CR>2CR> (CR>表示换行)
    28CR>4CR>2008CR>2CR> (CR>表示换行) 解析:本题考查了日期函数的应用。其中,Day(Now)函数,表示返回当前号数(即当前天是几号);Month(Now)函数,表示返回当前月份(即当前是几月);Year(Now)函数,表示返回当前年份(即当前是哪年);Weekday(Now)函数,表示返回当前星期号(即当前是星期几)。注意,星期号是用0~6来表示,0代表周六,1代表周日,2代表周一,3代表周二, 4代表周三,5代表周四,6代表周五。

  • 第4题:

    有以下程序: include difine F(X, Y)(X)*(Y)main(){int a=3, b=4; print("% d\n",

    有以下程序: # include<stdio. h> # difine F(X, Y) (X)*(Y) main() { int a=3, b=4; print("% d\n", F(a++, b++)); } 程序运行后的输出结果是______。

    A.12

    B.15

    C.16

    D.20


    正确答案:A
    解析:F(a++,b++)的宏展开为:F(a++,b++)=(a++)*(b++)=a*b=3×4=12,因此printf函数的输出结果是12。

  • 第5题:

    有如下语句: Type Student Name As String Age As Integer Sex As String End Type Dim Stu As Student With Stu .Name="张红" .Age=22 .Sex="女" End With 执行Print Stu.Age语句后的结果是

    A.张红

    B.22

    C.“女”

    D.Age


    正确答案:B
    解析:本题重点需理解自定义类型Student以及Student类型的变量Stu的使用。在使用Stu变量时用到了With...End With的结构,在该结构中的语句.Age=22相当于语句Stu. Age=22。故最后执行Print Stu. Age语句的结果值应为22。

  • 第6题:

    下列程序的运行结果为 include void print(double a) {cout < < ++a; } void pri

    下列程序的运行结果为

    #include<iostream. h>

    void print(double a)

    {

    cout < < ++a;

    }

    void print(int a, int b)

    {

    cout < < b < < a;

    }

    void main( )

    {

    print(1.2) ;

    tout < <" ";

    print(3,4) ;

    }

    A.1.2 34

    B.2.2 34

    C.1.2 43

    D.2.2 43


    正确答案:D
    解析:本题考查的是对重载函数的掌握,因为++a是右结合的,所以a先自加1再输出,即为2.2,之后调用函数print(int a, int b) 输出b和a,即43。

  • 第7题:

    下列程序的运行结果为includevoid print(double a){ cout<<++a;}void print(int a,

    下列程序的运行结果为 #include<iostream.h> void print(double a) { cout<<++a; } void print(int a,int b) { cout<<b<<a; } void main( ) { print(1.2); tout<<""; print(3,4); }

    A.1.2 34

    B.2.2 34

    C.1.2 43

    D.2.2 43


    正确答案:D
    解析:本题考查的是对重载函数的掌握,因为++a是右结合的,所以a先自加1再输出,即为2.2,之后调用函数print(int a,int b)输出b和a,即43。

  • 第8题:

    下列程序段的执行结果为______。 x=Int (Rnd+4) Select Case x Case 5 Print“优秀” Case 4 Print“良好” Case 3 Print“通过” Case Else Print“没有通过” End Select

    A. 优秀

    B.良好

    C.通过

    D.没有通过


    正确答案:B

  • 第9题:

    有如下程序:includeusing namespaee std;class A{public:A(int i):rl(i){ }void prin

    有如下程序: #include<iostream> using namespaee std; class A{ public: A(int i):rl(i){ } void print( ){cout<<'E'<<rl<<'-';} void print( )const}cout<<'C'<<rl*rl<<'-';} private: int rl; }; int main( ){ A al(2);eonst A a2(4); a1.print( );a2.print( ); return 0; } 程序的输出结果是

    A.运行时出错

    B.E2-C16-

    C.C4-C16-

    D.E2-E4-


    正确答案:B
    解析:在类中重载函数的情况下,常对象调用类的常成员函数,非常对象调用类的非常成员函数,故答案为B。

  • 第10题:

    下面程序段执行结果为 x=Int(Rnd()+3) Select Case x Case 5 Print "excellent" Case 4 Print "good" Case 3 Print"pass" Case Else Print"fail" End Select

    A.excellent

    B.good

    C.pass

    D.fail


    正确答案:C
    解析:本题中可以看到x=Int(Rnd()+3)语句,其中Rnd用来产生随机数,其值在0~1之间,而在(Rnd()+3)前面有Int进行强制转换,所以x为3,执行Print"pass"语句。

  • 第11题:

    ()命令将显示本机的路由表信息。

    • A、PRINT Route
    • B、ROUTE Print
    • C、TYPE Route
    • D、ROUTE Type

    正确答案:B

  • 第12题:

    单选题
    Memory utilization by the print spooler process is constantly climbing after users begin to print to a certain type of printer. Which of the following is the MOST likely cause of the problem?()
    A

    Corrupted print spooler software

    B

    Memory leak in one of the print drivers

    C

    The disk drive is out of free space

    D

    Memory leak in the print spooler


    正确答案: D
    解析: 暂无解析

  • 第13题:

    ( 29 )有如下程序

    #include <iostream>

    using namespace std;

    class A{

    public:

    A(int i=0):r1(i) { }

    void print() {cout<< ' E ’ <<r1<< ' - ' ;}

    void print() const {cout<< ' C ' <<r1*r1<< ' - ' ;}

    void print(int x) {cout << ' P ' <<r1*r1*r1<< ' - ' ;}

    private:

    int r1;

    };

    int main() {

    A a1;

    const A a2(4);

    a1.print(2);

    a1.print();

    return 0;

    }

    运行时的输出结果是

    A ) P8-E4

    B ) P8-C16-

    C ) P0-E4-

    D ) P0-C16-


    正确答案:D

  • 第14题:

    有如下程序: #inClude using nameSpace std; Class A{ public: A(inti=0):r1(i){ } void plint(){cout<<‘E’<<r1<<‘-’;} void print()const{cout<<‘C’<<r1*r1<<‘-’;} void print(int X){cout<<‘P’<<r1*r1*r1<<‘-’;} prlvate: intrl; }; intmain(){ Aal; constA a2(4); a1.print(2); a2.print(); returh0; } 运行时的输出结果是( )。

    A.P8-E4

    B.P8-C16-

    C.P0-E4-

    D.P0-C16-


    正确答案:D
    解析:略。

  • 第15题:

    运行以下程序段后,输出结果为【 】。

    a=4: b=2

    Print a*(a-B)


    正确答案:□8□
    □8□ 解析:Print语句可以包括一个或多个表达式,它可以是常数、变量(字符串或数值)数值表达式和属性值。如果是数值表达式时,则打印出表达式的值,也就是说Print语句还含有计算的功能;如果是字符串,则照原样输出。如果用Print语句打印出来的是数值的话,则正数数值具有一个前导和一个尾部空格,负数数值用负数符号替代一个前导空格,表达式a*(a-B) =8>0,故输出结果为080(其中口为空格)。

  • 第16题:

    有如下程序:

    #include<iostream>

    using namespace std;

    class A{

    public:

    A(int i):r1(i){}

    void print(){cout<<‘E’<<rl<<‘-’;}

    void print()const{cout<<‘C’<<rl*rl<<‘-’;}

    private:

    int rl:

    };

    int main(){

    A a1(2); const A a2(4);

    a1.print(); a2.print();

    return 0;

    }

    运行时的输出结果是

    A.运行时出错

    B.E2-C16-

    C.C4-C16-

    D.E2-E4-


    正确答案:B
    解析:a1.print( )执行第一个print函数,输出“E2-”,因为a2为const类型,故a2.print( )执行第二个Prnt函数,输出c16-。则程序输出结果为“E2-C16-”,故选B)。

  • 第17题:

    若有以下程序段: int r=8; print("%d\n",r>>1): 输出结果是( )。 A.16B.8S

    若有以下程序段: int r=8; print("%d\n",r>>1): 输出结果是( )。

    A.16

    B.8

    C.4

    D.2


    正确答案:C
    本题考查移位运算。将8转为二进制数为1000,右移一位不足补0,结果为0100,转化为十进制结果为4。

  • 第18题:

    下面程序段执行结果为x=Iht(Rnd()+4)Select Case x Case 5 Print"excellent" Case 4 Print"good" Case 3 Print"paSS" Case Else Print "fail"End Select

    A.excellent

    B.good

    C.pass

    D.fail


    正确答案:B
    解析:我们可以看到x=Int(Rnd()+4)语句,其中,Rnd是用来产生随机数的,其值在0~1之间,而在(Rnd()+4)前面有Int进行强制转换,所以x总为4,SelectCasex…EndSelect语句体中的Case4CR>Print"good"语句。所以正确答案是选项B.

  • 第19题:

    以下程序输出的结果为______。 x=1 y=4 Do Until y>4 x=x*y y=y + 1 Loop Print x

    A. 4

    B.8

    C.12

    D.16


    正确答案:A

  • 第20题:

    下面程序段执行结果为( )。 x=Int(Rnd()+4) Select Case x Case 5 Print"excellent" Case4 Print"good" Case 3 Print"pass" Case Else Print"fail" End Select

    A.excellent

    B.good

    C.pass

    D.fail


    正确答案:B

  • 第21题:

    下列程序的运行结果为( )。 #include<iostream.h> void print(double A. { cout<<++a: } void print(int atint B. { cout<<b<<a: } void main { print(1.2); eout<<””: print(3,4); }

    A.1.2 34

    B.2.2 34

    C.1.2 43

    D.2.2 43


    正确答案:D
    本题考查的是对重载函数的掌握,因为++a是右结合的,所以a先自加1再输出,即为2.2,之后调用函数print(inta,intb)输出h和a,即43。

  • 第22题:

    下列程序的运行结果为

    #include

    void print(double a)

    {

    cout<<++a;

    }

    void print(int a,int B)

    {

    cout<<

    }

    void main()

    {

    print(1.2);

    cout<<” ”;

    print(3,4);

    }

    A.1.2 34

    B.2.2 34

    C.1.2 43

    D.2.2 43


    正确答案:D

  • 第23题:

    Memory utilization by the print spooler process is constantly climbing after users begin to print to acertain type of printer.  Which of the following is the MOST likely cause of the problem?()

    • A、 Corrupted print spooler software
    • B、 Memory leak in one of the print drivers
    • C、 The disk drive is out of free space
    • D、 Memory leak in the print spooler

    正确答案:B