A.eng
B.glis
C.english
D.engli
第1题
请问以下代码有什么问题:
int main()
{
char a;
char *str=&a;
strcpy(str,"hello");
printf(str);
return 0;
}
第2题
A.var str1={‘name’:‘ls’,’addr’:{‘city’:’bj’,’street’:’ca’}};
B.var str1={‘name’:‘ls’,’addr’:{‘city’:bj,’street’:’ca’}};
C.var str={‘study’:‘english’,’computer’:20};
D.var str={‘study’:english,’computer’:20};
第3题
下面程序的功能是从键盘输入一行字符(不超过80个),统计其中的英文字符、数字字符、空格和其他字符的个数。例如,输入的一行字符为 *****c language.*****↙ 输出为 English character: 9 digit character: 0 space: 1 other character: 11 按要求在空白处填写适当的表达式或语句,使程序完整并符合题目要求。 #include <stdio.h> #include <string.h> #define STR_LEN 80 int main() { char str[STR_LEN+1]; int len, i, letter = 0, digit = 0, space = 0, others = 0; printf("Please input a string:"); ___________; for (i = 0; __________; i++) { if (___________________________) letter ++; /*统计英文字符 */ else if (______________________) digit ++; /*统计数字字符 */ else if (str[i] == ' ' ) space ++; /*统计空格*/ else others ++; /*统计其他字符的个数*/ } printf("English character: %d\n", letter); printf("digit character: %d\n", digit); printf("space: %d\n", space); printf("other character: %d\n", others); return 0; }
A、第9行: puts(str) 第10行: str[i] != '\n' 第12行: 'z' >= str[i] >= 'a' || 'A' <= str[i] 第14行:>= 0 || str[i] <=> B、第9行: scanf("%s",str) 第10行: str[i] != '\0' 第12行: 'z' >= str[i] >= 'a' || 'A' <= 9 str[i] 第14行:>= str[i] >= 0
C、第9行: gets(str) 第10行: str[i] != '\0' 第12行: str[i] >= 'a' && str[i] <= 'z' || str[i]>= 'A' && str[i] <= 'z' 第14行: str[i]>= '0' && str[i] <=> D、第9行: getchar("%s",str) 第10行: str[i] != '\n' 第12行: str[i] >= 'a' || str[i] <= 'z' && str[i]>= 'A' || str[i] <= 'z' 第14行: str[i]>= 0 && str[i] <=>
第4题
听力原文: The modern sailing ship was developed by a man who never went to sea. He was Prince Henry of Portugal, the younger son of the Portuguese King and an English princess.
Prince Henry lived in the 15th century. As a boy he became devoted to the sea, and he dedicated himself to improving the design of ships and the methods of sailing them. In 1416, Henry founded a school for mariners, to which he invited everyone who could help him--Jewish astronomers, Italian and Spanish sailors, and Arab mathematicians and map makers who knew how to use the crude compass of the day and improve it.
Henry's goal was to design and equip vessels that would be capable of making long ocean voyages without having to hug the shore. The caravel carried more sail and was longer and slimmer than any ship then made, yet was tough enough to withstand gales at sea. He also developed the carrack, which was a slower ship, but one that was capable of carrying more cargo.
To Prince Henry the world owes credit for the development of craft that made oceanic exploration possible. He lives in history as "Prince Henry the Navigator".
(30)
A.To help mariners.
B.To improve ship design and sailing methods.
C.To study astronomy and mathematics.
D.To improve his own skill as a sailor.
第5题
语句定义如下: char strl[50],str2[20],ch; 则下列语句正确的是______。
A.str1={"Crazy"}; str2=str1;
B.str1={"Crazy"}; str2={"English"}; strcpy(str1,str2);
C.ch="xy";
D.ch='x';
第6题
下面程序的功能是从键盘输入一行字符(不超过80个),统计其中的英文字符、数字字符、空格和其他字符的个数。例如,输入的一行字符为 *****c language.***** 输出为 English character: 9 digit character: 0 space: 1 other character: 11 按要求在空白处填写适当的表达式或语句,使程序完整并符合题目要求。 #include <stdio.h> #include <string.h> #define STR_LEN 80 int main() { char str[STR_LEN+1]; int len, i, letter = 0, digit = 0, space = 0, others = 0; printf("Please input a string:"); ___________; for (i = 0; __________; i++) { if (___________________________) letter ++; /*统计英文字符 */ else if (______________________) digit ++; /*统计数字字符 */ else if (str[i] == ' ' ) space ++; /*统计空格*/ else others ++; /*统计其他字符的个数*/ } printf("English character: %d\n", letter); printf("digit character: %d\n", digit); printf("space: %d\n", space); printf("other character: %d\n", others); return 0; }
A、第9行: gets(str) 第10行: str[i] != '\0' 第12行: str[i] >= 'a' && str[i] <= 'z' || str[i]>= 'A' && str[i] <= 'z' 第14行: str[i]>= '0' && str[i] <= '9'> B、第9行: scanf("%s",str) 第10行: str[i] != '\0' 第12行: 'z' >= str[i] >= 'a' || 'A' <= 9 str[i] 第14行:>= str[i] >= 0
C、第9行: puts(str) 第10行: str[i] != '\n' 第12行: 'z' >= str[i] >= 'a' || 'A' <= str[i] 第14行:>= '0' && str[i] <= '9'> D、第9行: scanf("%s",str) 第10行: str[i] != '\n' 第12行: str[i] >= 'a' || str[i] <= 'z' && str[i]>= 'A' || str[i] <= 'z' 第14行: str[i]>= 0 && str[i] <= 9>
第8题
下列程序的输出结果为______ Sub Prin() Dim B As String A=1 B=A & Space(4)& A Print A Print Trim(B) End Sub
第9题
from scrapy.selector import Selector htmlText=''' <bookstore> <book id="b1"> <title lang="english">Harry Potter</title> <price> 29.99 </price> </book> <book id="b2"> <title lang="chinese">学习XML</title> <price> 39.95 </price> </book> </bookstore> ''' selector=Selector(text=htmlText) s=selector.xpath("//book/price") print(type(s),s) ____________________________________ print(type(s),s) s=selector.xpath("//book/price").extract_first() print(type(s),s) 程序结果: <class 'scrapy.selector.unified.selectorlist'> [ <selector xpath="//book/price" data="<price>29.99</price>"> , <selector xpath="//book/price" data="<price>39.95</price>"> ] <class 'list'> [' <price> 29.99 </price>', ' <price> 39.95 </price>'] <class 'str'> <price> 29.99 </price>
A、s=selector.xpath("/book/price").extract()
B、s=selector.xpath("/book//price").extract()
C、s=selector.xpath("//book//price").extract()
D、s=selector.xpath("//book/price").extract()
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!