Volatile:a) What does the keyword volatile mean? Give an exampleb) Can a parameter be both const and volatile? Give an examplec) Can a pointer be volatile? Give an example

题目

Volatile:

a) What does the keyword volatile mean? Give an example

b) Can a parameter be both const and volatile? Give an example

c) Can a pointer be volatile? Give an example


相似考题

2.CPlants can’t communicate by moving or making sounds, as most animals do. Instead, plants produce volatile compounds, chemicals that easily change from a liquid to a gas. A flower’s sweet smell, for example, comes from volatile compounds that the plant produces to attract insects such as bugs and bees.Plants can also detect volatile compounds produced by other plants. A tree under attack by hungry insects, for instance, may give off volatile compounds that let other trees know about the attack, In response, the other trees may send off chemicals to keep the bugs away- or even chemicals that attract the bugs’ natural enemies.Now scientists have created a quick way to understand what plants are saying: a chemical sensor(传感器) called an electronic nose. The “e-nose” can tell compounds that crop plants make when they’re attacked. Scientists say the e-nose could help quickly detest whether plants are being eaten by insects. But today the only way to detect such insects is to visually inspect individual plants. This is a challenging task for managers of greenhouses, enclosed gardens that can house thousands of plants.The research team worked with an e-nose that recognizes volatile compounds. Inside the device, 13 sensors chemically react with volatile compounds. Based on these interactions, the e-nose gives off electronic signals that the scientists analyze using computer software.To test the nose, the team presented it with healthy leaves from cucumber, pepper and tomato plants, all common greenhouse crops. Then the scientists collected samples of air around damaged leaves from each type of crop. These plants had been damaged by insects, or by scientists who made holes in the leaves with a hole punch (打孔器).The e-nose, it turns out, could identify healthy cucumber, pepper and tomato plants based on the volatile compounds they produce. It could also identify tomato leaves that had been damaged. But even more impressive, the device could tell which type of damage – by insects or with a hole punch – had been done to the tomato leaves.With some fine tuning, a device like the e-nose could one day be used in greenhouses to quickly spot harmful bugs, the researchers say. A device like this could also be used to identify fruits that are perfectly ripe and ready to pick and eat, says Natalia Dudareve, a biochemist at Purdue University in West Lafayette, Ind. who studies smells of flowers and plants. Hopefully, scientists believe, the device could bring large benefits to greenhouse managers in the near future.49. We learn from the text that plants communicate with each other by______.A. making some sounds B. waving their leavesC. producing some chemicals D. sending out electronic signals

更多“Volatile:a) What does the keyword volatile mean? Give an exampleb) Can a parameter be both const and volatile? Give an examplec) Can a pointer be volatile? Give an example”相关问题
  • 第1题:

    若要把变量声名为多个线程共用的变量,应使用如下( )修饰符。

    A.protected

    B.prorate

    C.transient

    D.Volatile


    正确答案:D

  • 第2题:

    Which product is volatile ________.

    A.Benzene

    B.Diesel fuel

    C.Coal tar

    D.Heavy industrial fuel oil


    正确答案:A

  • 第3题:

    Can you give a concrete example to support your idea?

    A:special
    B:good
    C:real
    D:specific

    答案:D
    解析:
    本句意思:你能给我一个具体的例子来支持你的想法吗?句中concrete意为“具体的”。 四个选项中,它的同义词是specific。 special“特殊的”;good“好的”;real“真实的”。

  • 第4题:

    一个参数既可以是const还可以是volatile吗?一个指针可以是volatile吗?解释为什么。


    正确答案: 1).是的。一个例子是只读的状态寄存器。它是volatile因为它可能被意想不到地改变。它是const因为程序不应该试图去修改它。
    2).是的。尽管这并不很常见。一个例子是当一个中服务子程序修该一个指向一个buffer的指针时。

  • 第5题:

    请指明该定义的含义并解释每个修饰关键词的作用:volatile const unsigned char UTRSTAT0。


    正确答案: 易失只读状态寄存器UTRSTAT0;
    Volatile:可能被外界(硬件、其他进程)改变;
    Const:本程序不应该试图去修改它;
    Unsignedchar:无符号字节类型;

  • 第6题:

    下列哪项不是Java语言的关键字?()

    • A、goto
    • B、sizeof
    • C、instanceof
    • D、volatile

    正确答案:B

  • 第7题:

    volatile关键字的说法错误的是()。

    • A、能保证线程安全
    • B、volatile关键字用在多线程同步中,可保证读取的可见性
    • C、JVM保证从主内存加载到线程工作内存的值是最新的
    • D、volatile能禁止进行指令重排序

    正确答案:A

  • 第8题:

    问答题
    请指明该定义的含义并解释每个修饰关键词的作用:volatile const unsigned char UTRSTAT0。

    正确答案: 易失只读状态寄存器UTRSTAT0;
    Volatile:可能被外界(硬件、其他进程)改变;
    Const:本程序不应该试图去修改它;
    Unsignedchar:无符号字节类型;
    解析: 暂无解析

  • 第9题:

    单选题
    —Who shall I give this dictionary to?—You can give it to ______. It doesn’t matter.
    A

    anybody

    B

    somebody

    C

    everybody


    正确答案: B
    解析:
    本题考查近义词辨析。anybody意为 “任何人”;somebody意为“某人”;everybody 意为“每个人,大家”。

  • 第10题:

    单选题
    What advantage does the purchase give Lenovo?
    A

    Lenovo can use a world-famous brand name for some time.

    B

    Lenovo can hold 18. 9% of the stocks of IBM.

    C

    Lenovo can enter into the area of catering to businesses over the Internet.

    D

    Lenovo can shake off a US $500 million debt.


    正确答案: A
    解析:
    事实细节的找寻和判断。关于此次收购会给联想带给的好处,录音中指出 “Lenovo…will reap benefits of the world’s third most recognized brand—IBM’s brand name is worth US $53. 8 billion…”,由此可知,收购之后,联想将会从世界第三大品牌中获益,因为IBM的品牌价值达538亿美元。因此选项A的内容与录音原文相符。
    【录音原文】
      Lenovo Group has agreed to pay US $1, 25 billion for IBM’s personal computer business, lifting China’s largest PC maker to third in global rankings and giving it a globally recognized brand.
      Lenovo will pay US $600 million in cash and US $650 million in stock. Lenovo chief executive Yang Yuanqing said at a press conference in Beijing.
      Lenovo will also assume US $500 million of debt. IBM will hold an 18.9 percent stake in Hong Kong-listed Lenovo after the acquisition, which is expected to be completed in the second quarter. The purchase vaults Lenovo from eighth place among PC makers, giving the company a leg up in a global market now dominated by US manufacturers Dell and Hewlett-Packard.
      “It’s a good move for IBM,” said Jason Maxwell, an analyst at Los Angeles-based TCW Group, which owns IBM shares. “It fits with their decade-old strategy of disinvesting in those areas where they don’t have an advantage.” IBM sold its hard-disk drive business in 2002 after the technology behind the products became widely available and easy to copy, leading to depressed profits. The same thing has happened in PCs as consumers use new items such as mobile phones to access the Internet. IBM, which made its first PC in 1981 and won orders by catering to businesses, retreated from selling its Aptiva PCs to retailers in the US in 1999 and decided to sell over the Internet.
      Lenovo, based in Beijing, will reap benefits of the world’s third most recognized brand—IBM’s brand name is worth US $53, 8 billion, according to a survey by Interbrand.

  • 第11题:

    单选题
    Before any machinery is put in operation,you should().
    A

    ventilate all compartments,see that the machinery is clean and there are no obstructions

    B

    just turn the key and start up

    C

    take for granted that there are no fuel leaks

    D

    assume there are no volatile fumes in the engine space


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

  • 第12题:

    问答题
    列出volatile变量使用的几种情况。

    正确答案: 并行设备的硬件寄存器(如:状态寄存器);中断服务子程序中会访问到的非自动变量;多线程应用中被几个任务共享的变量。
    解析: 暂无解析

  • 第13题:

    若要把变量声名为多个线程共用的变量,应使用如下哪种修饰符?

    A.protected

    B.provate

    C.transient

    D.volatile


    正确答案:D

  • 第14题:

    This does not mean I will take it______from the rich and give it to the poor.

    A.up
    B.on
    C.in
    D.away

    答案:D
    解析:
    本题考查介词辨析。题目意为“这并不意味着我将会劫富济贫”。A选项“从事”,B选项“呈现”,C选项“接受,领会”,D选项“拿走,夺去”。根据题干,take away from意为“从……手里拿走”,故D选项更符合题意。
      

  • 第15题:

    VOC是()(volatile organic compounds)的简称。

    • A、挥发性有机化合物
    • B、甲醛气体

    正确答案:A

  • 第16题:

    Which three statements concerning the use of the java.io.Serializable interface are true?()

    • A、Objects from classes that use aggregation cannot be serialized
    • B、An object serialized on one JVM can be successfully deserialized on a different JVM
    • C、The values in fields with the volatile modifier will NOT survive serialization and deserialization
    • D、The values in fields with the transient modifier will NOT survive serialization and deserialization
    • E、It is legal to serialize an object of a type that has a supertype that does NOT implement java.io.Serializable

    正确答案:B,D,E

  • 第17题:

    关键字volatile有什么作用?


    正确答案:阻止编译器优化。一个定义为volatile的变量是说这变量可能会被意想不到地改变精确地说就是,优化器在用到这个变量时必须每次都小心地重新读取这个变量的值,而不是使用保存在寄存器里的备份。

  • 第18题:

    挥发油(Volatile oils)


    正确答案:又称精油(essential oils),是一类难溶于水、可随水蒸气蒸馏、具有芳香气味的油状液体混合物。

  • 第19题:

    Which three statements concerning the use of the java.io.Serializable interface are true?()

    • A、Objects from classes that use aggregation cannot be serialized.
    • B、An object serialized on one JVM can be successfully deserialized on a different JVM.
    • C、The values in fields with the volatile modifier will NOT survive serialization and deserialization.
    • D、The values in fields with the transient modifier will NOT survive serialization and deserialization.
    • E、It is legal to serialize an object of a type that has a supertype that does NOT implement java.io.Serializable.

    正确答案:B,D

  • 第20题:

    单选题
    I can’t give you that for nothing. What do you take me_____?
    A

    as  

    B

    for

    C

    to

    D

    after


    正确答案: B
    解析:
    我不能白送给你,你以为我是什么人?what do you take me for是一个固定句式,表示一种反问,例如:What do you take me for, an idiot? 你以为我是傻瓜么?

  • 第21题:

    名词解释题
    挥发油(Volatile oils)

    正确答案: 又称精油(essential oils),是一类难溶于水、可随水蒸气蒸馏、具有芳香气味的油状液体混合物。
    解析: 暂无解析

  • 第22题:

    多选题
    Which three statements concerning the use of the java.io.Serializable interface are true?()
    A

    Objects from classes that use aggregation cannot be serialized

    B

    An object serialized on one JVM can be successfully deserialized on a different JVM

    C

    The values in fields with the volatile modifier will NOT survive serialization and deserialization

    D

    The values in fields with the transient modifier will NOT survive serialization and deserialization

    E

    It is legal to serialize an object of a type that has a supertype that does NOT implement java.io.Serializable


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

  • 第23题:

    多选题
    Which three statements concerning the use of the java.io.Serializable interface are true?()
    A

    Objects from classes that use aggregation cannot be serialized.

    B

    An object serialized on one JVM can be successfully deserialized on a different JVM.

    C

    The values in fields with the volatile modifier will NOT survive serialization and deserialization.

    D

    The values in fields with the transient modifier will NOT survive serialization and deserialization.

    E

    It is legal to serialize an object of a type that has a supertype that does NOT implement java.io.Serializable.


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