单选题Which statement of assigning a long type variable to a hexadecimal value is correct?()Along number = 345L;Blong number = 0345;Clong number = 0345L;Dlong number = 0x345L;

题目
单选题
Which statement of assigning a long type variable to a hexadecimal value is correct?()
A

 long number = 345L;

B

 long number = 0345;

C

 long number = 0345L;

D

 long number = 0x345L;


相似考题
参考答案和解析
正确答案: D
解析: 十六进制数以0x开头,long型数以L(大小写均可,一般使用大写,因为小写的l和数字1不易区分)。
更多“单选题Which statement of assigning a long type variable to a hexadecimal value is correct?()A  long number = 345L;B  long number = 0345;C  long number = 0345L;D  long number = 0x345L;”相关问题
  • 第1题:

    下列哪个选项是将一个十六进制值赋值给一个long型变量? ( )

    A.long number=123L;

    B.long number=0123;

    C.long number=0123L;

    D.long number=0x123L;


    正确答案:C

  • 第2题:

    阅读下面求质数的程序 import java.lang.Math.*: public class MorePrimesTest { public static void main(String[] args) { long[] primes=new long[20]; primes[0]=2L; primes[0]=3L; long number=5L; outer: for(int count=2;count<primes.length;number+=2L) { long limit=(long)Math.ceil(Math.sqrt((double)number)); for(int i=1;i<count&&primes[i]<=limit;i++) { if(number primes[i]==OL)continue outer; } primes[count++]=number; } for(int J=0;j<primes.length;j++) { long n=primes[j]; System.out.println(n); } } } 程序下画线处应填入的正确选项是

    A.&

    B.*

    C./

    D.%


    正确答案:D

  • 第3题:

    As the number of local residents' visits to public swimming facilities climbs,__________the demand for lifeguards to supervise them.

    A.as to
    B.Aas does
    C.as long as
    D.whereas

    答案:B
    解析:
    “as to”是至于,关于;“as long as”只要;“whereas”鉴于;“as does”有“一样,也是这样”的意思。由于当地居民参观公共游泳设施人数的攀升,所需要的监管居民的救生员数量也要有所提升。

  • 第4题:

    The number of the disabled Americans went up for so long that the trend of falling out of the labor force seemed like it might be______。

    A.adequate
    B.concrete
    C.practical
    D.permanent

    答案:D
    解析:
    本题考查形容词的词义辨析。题目意为“美国残疾人人数上升了这么久,以致于劳动力流失的趋势似乎是永久性的。”A选项“足够的,适当的”,B选项“具体的,实在的”,C选项“实践的,实际的”, D选项“永久的,永恒的”。根据题意,由于残疾人数长期上涨,导致劳动力市场人力状况已成定势,故D选项符合题意。
      

  • 第5题:

    The TTL field was originally designed to hold a time stamp, which was decremented by each visited router. The datagram was ( ) when the value became zero. However, for this scheme, all the machines must have synchronized clocks and must know how long it takes for a datagram to go from one machine to another. Today, this field is used mostly to control the ( ) number of hops (routers) visited by the datagram. When a source host sends the datagram, it ( ) a number in this field. Each router that processes the datagram decrements this number by 1. If this value, after being decremented, is zero, the router discards the datagram.This field is needed because routing tables in the Internet can become corrupted.A datagram may travel between two or more routers for a long time without ever getting delivered to the (请作答此空).This field limits the ( ) of a datagram.

    A.switch
    B.router
    C.source host
    D.destination host

    答案:D
    解析:
    TTL的基本概念。

  • 第6题:

    You need to store a Java long primitive attribute, called customerOID, into the session scope. Which two code snippets allow you to insert this value into the session?()

    • A、long customerOID = 47L;session.setAttribute("customerOID", new Long(customerOID));
    • B、long customerOID = 47L;session.setLongAttribute("customerOID", new Long(customerOID));
    • C、long customerOID = 47L;session.setAttribute("customerOID", customerOID);
    • D、long customerOID = 47L;session.setNumericAttribute("customerOID", new Long(customerOID));

    正确答案:A,C

  • 第7题:

    How long will a port remain in the listening state by default?()

    • A、Depends on the number of switches in the spanning tree domain
    • B、50 seconds
    • C、15 seconds
    • D、Until the root directs it to start forwarding
    • E、20 seconds
    • F、Depends on the pott speed

    正确答案:C

  • 第8题:

    Which statement is true about vishing?()

    • A、Influencing users to forward a call to a toll number (for example, a long distance or international number)
    • B、Influencing users to provide personal information over a web page
    • C、Using an inside facilitator to intentionally forward a call to a toll number (for example, a long distance orinternational number)
    • D、Influencing users to provide personal information over the phone

    正确答案:D

  • 第9题:

    Which statement of assigning a long type variable to a hexadecimal value is correct?()

    • A、 long number = 345L;
    • B、 long number = 0345;
    • C、 long number = 0345L;
    • D、 long number = 0x345L;

    正确答案:D

  • 第10题:

    单选题
    Which statement is true?()
    A

    An IPv6 address is 64 b long and is represented as hexadecimal characters.

    B

    An IPv6 address is 32 b long and is represented as decimal digits.

    C

    An IPv6 address is 128 b long and is represented as decimal digits.

    D

    An IPv6 address is 128 b long and is represented as hexadecimal characters


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

  • 第11题:

    单选题
    Which statement is true?()
    A

    An IPv6 address is 64 b long and is represented as hexadecimal characters.

    B

    An IPv6 address is 32 b long and is represented as decimal digits.

    C

    An IPv6 address is 128 b long and is represented as decimal digits.

    D

    An IPv6 address is 128 b long and is represented as hexadecimal characters.


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

  • 第12题:

    单选题
    The primary function of the first paragraph of the passage is to _____.
    A

    present a historical context for the author’s observations

    B

    anticipate challenges to the prescriptions that follow

    C

    clarify some disputed definitions of economic terms

    D

    summarize a number of long—accepted explanations


    正确答案: D
    解析:
    第一段是通过提供历史数据说明cost-cutting并不能improve productivity,所以A为正确选项。

  • 第13题:

    Which of the following are all valid DB2 data types?()

    A.LONG VARCHAR, SMALLINT, NUMBER, BLOB

    B.DECIMAL, DATE, DBCLOB, INTERVAL

    C.NUMERIC, TIMESTAMP, BYTE, FLOAT

    D.NUM, TIME, XML, DOUBLE


    参考答案:D

  • 第14题:

    According to the passage, when you get a wrong number in making a long-distance call, you should______.

    A. check your number and call again

    B. tell the operator what has happened

    C. Ask the operator to put you through

    D. Ask the operator what has happened


    正确答案:B

    39.答案为B  第二段...call the operator and explain what happened可知拨错号码后可向接线员解释,以免收费。

  • 第15题:

    Advertising has long been viewed as a method of mass ______ in that a single message can reach a large number of people.

    A.promotion
    B.permission
    C.fantasy
    D.popularity

    答案:A
    解析:
    本题考察词义辨析。题目意为“长久以来,广告一直被视为一种大众传播推广的手段,一条简单的信息能够借此传达给数量较大的受众。”A选项意为“提升,推广”,B选项意为“允许,许可”,C选项意为“幻想,幻觉”,D选项意为“普及,流行”。根据题意,广告是一种推广手段。
      

  • 第16题:

    The TTL field was originally designed to hold a time stamp, which was decremented by each visited router. The datagram was ( ) when the value became zero. However, for this scheme, all the machines must have synchronized clocks and must know how long it takes for a datagram to go from one machine to another. Today, this field is used mostly to control the ( ) number of hops (routers) visited by the datagram. When a source host sends the datagram, it (请作答此空) a number in this field. Each router that processes the datagram decrements this number by 1. If this value, after being decremented, is zero, the router discards the datagram.This field is needed because routing tables in the Internet can become corrupted.A datagram may travel between two or more routers for a long time without ever getting delivered to the ( ).This field limits the ( ) of a datagram.

    A.controls
    B.transmits
    C.stores
    D.receives

    答案:C
    解析:
    TTL的基本概念。

  • 第17题:

    Which statement is true?()

    • A、An IPv6 address is 64 b long and is represented as hexadecimal characters.
    • B、An IPv6 address is 32 b long and is represented as decimal digits.
    • C、An IPv6 address is 128 b long and is represented as decimal digits.
    • D、An IPv6 address is 128 b long and is represented as hexadecimal characters

    正确答案:D

  • 第18题:

    Which statement is true?()

    • A、An IPv6 address is 64 b long and is represented as hexadecimal characters.
    • B、An IPv6 address is 32 b long and is represented as decimal digits.
    • C、An IPv6 address is 128 b long and is represented as decimal digits.
    • D、An IPv6 address is 128 b long and is represented as hexadecimal characters.

    正确答案:D

  • 第19题:

    哪个是将一个十六进制值赋值给一个long型变量?()

    • A、long number=345L
    • B、long number=0345
    • C、long number=0345L
    • D、long number=0x345L

    正确答案:D

  • 第20题:

    Which of the following are all valid DB2 data types?()

    • A、LONG VARCHAR, SMALLINT, NUMBER, BLOB
    • B、DECIMAL, DATE, DBCLOB, INTERVAL
    • C、NUMERIC, TIMESTAMP, BYTE, FLOAT
    • D、NUM, TIME, XML, DOUBLE

    正确答案:D

  • 第21题:

    单选题
    哪个是将一个十六进制值赋值给一个long型变量?()
    A

    long number=345L

    B

    long number=0345

    C

    long number=0345L

    D

    long number=0x345L


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

  • 第22题:

    单选题
    Which statement is true about vishing?()
    A

    Influencing users to forward a call to a toll number (for example, a long distance or international number)

    B

    Influencing users to provide personal information over a web page

    C

    Using an inside facilitator to intentionally forward a call to a toll number (for example, a long distance orinternational number)

    D

    Influencing users to provide personal information over the phone


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

  • 第23题:

    单选题
    In the US, there is a long waiting list for organs because ______.
    A

    there is a shortage of actual organs

    B

    only a few people become organ donors

    C

    doctors have set a limit to the number of organ recipients

    D

    transplant surgery is still experimental


    正确答案: D
    解析:
    细节题。由第二段最后一句可知,器官不足的原因是只有20%的死者成为器官捐赠者,故B项为正确答案。