问题 问答题 简答题

C和C++有什么不同?

答案

参考答案:

从机制上:c是面向过程的(但c也可以编写面向对象的程序);c++是面向对象的,提供了类。但是,c++编写面向对象的程序比c容易。

从适用的方向:c适合要求代码体积小的,效率高的场合,如嵌入式;c++适合更上层的,复杂的;linux核心大部分是c写的,因为它是系统软件,效率要求极高。

从名称上也可以看出,c++比c多了+,说明c++是c的超集;那为什么不叫c+而叫c++呢,是因为c++比c来说扩充的东西太多了,所以就在c后面放上两个+;于是就成了c++。

C.语言是结构化编程语言,C++是面向对象编程语言。C++侧重于对象而不是过程,侧重于类的设计而不是逻辑的设计。

选择题
阅读理解

阅读理解。

     Fat and shy, Ben Saunders was the last kid in hid class picked for any sports team. "Football, tennis,

cricket- anything with a round ball, I was useless," he says now with a laugh. But back then he was the

one always made fun of in school gym chasses in Devonshire, England.

     It was a mountain bike he received for his 15th birthday that changed him. At first he went biking

alone in a nearby forest. Then he began to ride the bike along with a runner friend. Gradually, Saunders

set his mind on building up his body, increasing his speed and strength. At the age of 18, he ran his first

marathon.

     The following year, he met John Ridgway and was hired as an instructor at Ridgway' s School of

Adventure in Scotland, where he learned about Ridgway' s cold-water exploits, Greatly interested, Saunders

read all he could about North Pole explorers and adventures, then decided that this would be his future.

     In 2001, after becoming a skillful skier, Saunders started his first long-distance expedition (探险)

towards the North Pole. It took unbelievable energy. He suffered frostbite (冻疮), ran into a polar bear

and pushed his body to the limit, pulling his supply-loaded sled (雪橇) up and over rocky ice.

     Saunders has since become the youngest person to ski alone to the North pole, and he's skied more

of the North Pole by himself than any other British man. His old playmates would not believe the change.

     Next October, Saunders, 27, heads south from the coast of Antarctica to the South Pole and back,

a 2900-kilometre journey that has never been completed on skis.

1. What change happened to Saunders after he was 15 years old?

A. He became good at most sports.

B. He began to build up his body.

C. He joined a sports team.

D. He made friends with a runner.

2. The underlined word "exploits" (paragraph 3) is closest in meaning to ______.

A. journeys

B. researches

C. adventures

D. operations

3. Which of the following is the correct order of the events that happened to Saunders?

     a. He ran his first marathon.

    b. He skied alone in the North Pole.

    c. he rode his bike in a forest.

    d. He planned an adventure to the South Pole.

A. acdb

B. cdab

C. acbd

D. cabd

4. What does the story mainly tell us about Saunders?

A. He is a success in sports.

B. He is the best British skier.

C. He is Ridgway's favorite student.

D. He is a good instructor at school.