重要提示: 请勿将账号共享给其他人使用,违者账号将被封禁!
查看《购买须知》>>>
当前位置: 首页 > 计算机类考试 > 计算机二级
网友您好, 请在下方输入框内输入要搜索的题目:
搜题

题目

[主观题]

下面程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是public class Fin

下面程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是 public class FindKeyWords{ public static void main(String[]args) { String text="An array is a data structur that stores a collection of" +"values of the same type. You access each indMdual value" +"through an integer index. For example,if a is an array" +"of inergers,then a[i]is the ith integer in the array."; int arrayCount=0; int index=-1; String arrayStr="array"; index=text.indexOf(arrayStr); while(index>=0) { ++arrayCount; index+=arrayStr.length(); index=text.indexOf(arrayStr,index); } System.out.println("the text contains"+arrayCount+"arrays"); } }

A.<

B. =

C.<=

D.>=

查看参考答案
更多“下面程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是public class Fin”相关的问题

第1题

下列程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是()。
下列程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是()。  A.<B下列程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是()。  A.<B

A.<

B.=

C.<=

D.>=

点击查看答案

第2题

下列程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是()。publicclassFi

下列程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是()。 publicclassFindKeyWords{ publicstaticvoidmain(sring[]args){ stingtext= “Anarrayisadatastructurthatstoresacollectionof” +“valuesofthesametype.YOUaccesseachindividualvalue'’ +“throughanintegerindex.Forexample,ifaiSanarray” +“of inergers,thena[i]iSthe ith integer in thearray.”; In tarrayCount=0; Intidex=-1; Sting arrarStr=“array”; IndeX=text.indexof(arrayStr); While(index______0){ ++arrayCount; Index+=arrayStr.length(); IndeX=text.indexof(arrayStr,indeX); } SyStem.out.phntln (“thetextcontains”+arrayCount+“arrays”); } }

A.<

B.=

C.<=

D.>=

点击查看答案

第3题

(30 )下列程序的功能是统计字符串中 “ array ” 的个数,在程序的空白处应填入的正确选项是public

(30 )下列程序的功能是统计字符串中 “ array ” 的个数,在程序的空白处应填入的正确选项是

public class FindKey Word s{

public static void main(sring[] args){

sting text=

“ An array is a data structur that stores a collection of ”

+ “ values of the same type . You access each individual value ”

+ “ through an integer index . For example,if a is an array ”

+ “ of inergers, then a[i] is the ith integer in the array. ” ;

Int arrayCount =0;

Int idex = -1;

Sting arrarStr = ” array ” ;

Index = text.indexof(arrayStr);

While(index______ 0) {

++arrayCount;

Index += arrayStr.length();

Index = text.indexof(arrayStr,index);

}

System.out.println

(“ the text contains ” + arrayCount + “ arrays ” );

}

}

A) <

B) =

C) <=

D) >=

点击查看答案

第4题

下列程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是()。 public cl
ass FindKeyWords(public static void main(sring[]args){ sting text= "An array is a data structur that stores a eollection of" +"values of the same type.You access each individu- al value" +"through an integer index.For example.if a is an array" +"of inergers,then all]is the ith integer in the ar- ray."; Int arrayCount=0; Int idex=-l; Sting arrarStr="array": Index=text.indexof(arrayStr); While(index 0){ ++arrayCount: Index+=arrayStr.1ength; Index=text.indexof(arrayStr,index); } System.OUt.println ("the text contains"+arrayCount+"arrays"); } }

A.<

B.=

C.<=

D.>=

点击查看答案

第5题

下面程序的功能是统计字符串中"i"的个数,请填空。 SubCOU() a$="BeijingUniversityofTec

下面程序的功能是统计字符串中"i"的个数,请填空。

Sub COU()

a$="Beijing University of Technology"

Dim n As Integer

n=Len(a$)

For i=1 To n

b$= 【12】

If 【13】 Then x=x + 1

Next i

Print "x="; x

End Sub

点击查看答案

第6题

下面程序的功能是统计字符串中"i"的个数,请填空。 Sub COU() Dim n As Integer a$=" Beijing Uni

下面程序的功能是统计字符串中"i"的个数,请填空。

Sub COU()

Dim n As Integer

a$=" Beijing University of Technology"

n=Len(a$)

For i=1 To n

b$=【 】

If b$="i" Then x=x+1

Next

Print"x=" ; x

End Sub

点击查看答案

第7题

下面程序的功能是()。#include <iostream>#include <string>using namespace std;int main (){ in

下面程序的功能是()。 #include <iostream> #include <string> using namespace std; int main () { int i=1, n=0; char s[80],*p; p=s; strcpy(p,"It is a book.."); for (; *p !=' \0' ;p++) { if(*p=='') i=0; else if (i==0) { n++; i=1; } } cout<<"n=" <<n<<end1; return 0; }

A.统计字符串中的单词个数

B.统计字符串中的空格个数

C.统计字符串中的字母个数

D.统计字符串中的全部字符个数

点击查看答案

第8题

下面这个Sub过程的功能是统计字符串中“a”的个数,请在空白处填上合适的代码完成程序。Private Sub

下面这个Sub过程的功能是统计字符串中“a”的个数,请在空白处填上合适的代码完成程序。

Private Sub numCount()

Dim hum As Integer

s$ = "software And hardware"

num = Len(s$)

For i = 1 To hum

b$=______

If b$ = "a" Then x = x+1

Next i

Print "x="; x

End Sub

点击查看答案

第9题

假设ES段中有一个字符串“12FG3LM5C”,其名为ARRAY,下面程序段执行后,CX的值是______。 CLD LEA DI, ES:ARRA

假设ES段中有一个字符串“12FG3LM5C”,其名为ARRAY,下面程序段执行后,CX的值是______。

CLD

LEA DI, ES:ARRAY

MOV AL, 'G'

MOV CX, 9

REPNE SCASB

HLT

A.9 B.5 C.4 D.0

点击查看答案

第10题

假设ES段中有一个字符串“ABCDECF”,其名为ARRAY,下面程序段执行后,CX的值是______。 CLD LEA DI, ES:ARRAY

A.A.3

B.B.4

C.C.5

D.D.2

点击查看答案
赏学吧APP
TOP
重置密码
账号:
旧密码:
新密码:
确认密码:
确认修改
购买搜题卡查看答案
购买前请仔细阅读《购买须知》
请选择支付方式
微信支付
支付宝支付
点击支付即表示你同意并接受《服务协议》《购买须知》
立即支付
搜题卡使用说明

1. 搜题次数扣减规则:

功能 扣减规则
基础费
(查看答案)
加收费
(AI功能)
文字搜题、查看答案 1/每题 0/每次
语音搜题、查看答案 1/每题 2/每次
单题拍照识别、查看答案 1/每题 2/每次
整页拍照识别、查看答案 1/每题 5/每次

备注:网站、APP、小程序均支持文字搜题、查看答案;语音搜题、单题拍照识别、整页拍照识别仅APP、小程序支持。

2. 使用语音搜索、拍照搜索等AI功能需安装APP(或打开微信小程序)。

3. 搜题卡过期将作废,不支持退款,请在有效期内使用完毕。

请使用微信扫码支付(元)
订单号:
遇到问题请联系在线客服
请不要关闭本页面,支付完成后请点击【支付完成】按钮
遇到问题请联系在线客服
恭喜您,购买搜题卡成功 系统为您生成的账号密码如下:
重要提示: 请勿将账号共享给其他人使用,违者账号将被封禁。
发送账号到微信 保存账号查看答案
怕账号密码记不住?建议关注微信公众号绑定微信,开通微信扫码登录功能
警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“赏学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

- 微信扫码关注赏学吧 -
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反赏学吧购买须知被冻结。您可在“赏学吧”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
- 微信扫码关注赏学吧 -
请用微信扫码测试
温馨提示
每个试题只能免费做一次,如需多次做题,请购买搜题卡
立即购买
稍后再说
赏学吧