试题与答案

字符串"\\\"ABCDEF\"\\"的长度是( )。A) 15 B) 10 C)

题型:单项选择题

题目:

字符串"\\\"ABCDEF\"\\"的长度是( )。

A) 15
B) 10
C) 7
D) 8

答案:

参考答案:B

解析: 本题涉及字符串最墓本的两个概念:①字符串的长度是指字符串中字符的个数,但不包括字符串结束符;②以反斜杠“\”开头的特殊字符序列,意思是把反斜杠后面的字符序列转换成特定的含义,而不是原来的含义,不包含在字符串长度之内,“\”连同后面的字符为一个长度。

试题推荐
题型:阅读理解

阅读短文, 根据短文内容回答问题。

Have you ever wondered what an American high school is really like? This article will describe a typical (典型的) high school and its students.

A typical American high school has several large buildings and enough space for about 1,500 students. Every student is given a locker. When students first arrive at school, they go straight to their lockers to put away or get their textbooks and to hang up their outdoor clothes. As American textbooks are expensive, students would rather borrow than buy them. Students must pay back if they lose any of them.

American students have different types of school transport. They usually take a yellow school bus or walk to school if they live close enough. Sometimes their parents drive them to school. When they turn 16 years of age, most take a free driving class at school for one term. If students get passing grades in the class and also pass their state driver’s exam, they can begin driving themselves to school.

Each day, students take six or seven classes. They must take science, maths, English and social studies. They can choose art, homemaking, clothes making and other classes. In some schools students are asked to take one or more of the following special classes: health education, physical education or foreign language studies. Students move to different classrooms for each subject. This is because each teacher has their own classroom. There is a five-minute break between classes, to give the students the time to hurry to their next class.

The school day usually ends early in the afternoon. After school more than half of the students take part in after-school activities. These activities include sports --- especially football, basketball, baseball and soccer or clubs, such as yearbook, speech, school newspaper, and photography and student government.

小题1:How many students are there in the typical American school?

小题2:What do they do first when they arrive at school?

小题3:What subjects must they study?

小题4:What do they do after school?

小题5:What can you learn about the American school life from the passage?

查看答案
题型:选择题

二战后,美国出于控制欧洲及与苏联争霸的战略目的,于1949年联合西方国家建立了北约。冷战结束后,美国也绝不会允许自己主导的这一跨大西洋军事政治集团寿终正寝,北约将在可预见的将来继续存在下去。这说明

A.国际组织的产生与发展取决于美国的需要

B.北约在促进世界和平与发展方面具有重要作用

C.北约受美国控制,是美国推行强权和霸权的工具

D.北约是凌驾于国家主权之上的国际组织

查看答案
题型:单项选择题

阅读以下程序段,在实模式存储管理方案中,gvCh存放在 () 中;main函数编译后的代码存入在 () 中;指针p存放在 () 中。

#include<malloc. h>

unsigned char gvCh;

unsigned short gvShort

unsigned int gvInt=0x12345678

unsigned long gvLong=0x23456789;

ovid main(void)

unsigned char array[10], *p;

p=malloc(10 * sizeof(char))

while(1)

 

在实模式存储管理方案中指针p存放在()中。

A.栈空间

B..data段

C..bss段

D.堆空间

查看答案
微信公众账号搜索答案