python中,p=‘hello world!’,则p[2:5]的值是()A、llB、lloC、heD、hello

python中,p=‘hello world!’,则p[2:5]的值是()

  • A、ll
  • B、llo
  • C、he
  • D、hello

相关考题:

下列程序的输出结果是()。includeusing namespace std;int main()于chara[]=”Hello,Te 下列程序的输出结果是( )。 #include<iostream> using namespace std; int main() 于 chara[]=”Hello,Test”; Char*p=a; while(*p) { if(*p)=’a’*p(=’z’) cout<<char(*p+’A’-’a’); else cout<<*p; p++; } return 0; }A.hello,testB.Hello,TestC.HELLO,TESTD.hELLO,tEST

若要以标题2形式、红色显示Hello World文字,应该怎样编写?() A.〈font color="red" size="2"〉Hello World〈/font〉B.〈h2〉〈red〉Hello World〈/red〉〈/h2〉C.〈h2〉〈font color="red"〉Hello World〈/font〉〈/h2〉D.〈h2〉Hello World〈/h2〉

以下程序的输出结果是 ______。includeincludevoidmain(){char *p1=",he 以下程序的输出结果是 ______。 #include<iostream.h> #include<string.h> void main(){ char *p1=",hello",*p2="world!",str[50]:"Hii"; strcpy(str+2,p1); strcat(str,p2); cout<<str; }A.Hii,hello world!B.hello world!C.ii,hello world!D.Hi,hello world!

下列对字符数组进行初始化的语句正确的是A.char a []="Hello";B.char a[][]={'H','e','1','1','o');C.char a[5]="Hello";D.char a[2][5]={"Hello", "World"};p

下列程序的输出结果是()。includeusing namespace std;int main(){char a[]="Hello,Te 下列程序的输出结果是( )。 #include<iostream> using namespace std; int main() { char a[]="Hello,Test"; char *p=a; while(*p) { if(*p>='a'*p<='’z') cout<<char(*p+'A'-'a'); else cout<<*p; p++; } return 0; }A.hello,testB.Hello,TestC.HELLO,TESTD.hELLO,tEST

以下程序的输出结果是 ______。includevoid main(){ char s1[]=”Hello”,s2[]="World 以下程序的输出结果是 ______。 #include<iostream.h> void main(){ char s1[]=”Hello”,s2[]="World"; char *p1,*p2; int i; p1=s1; p2=s2; for(i=0;i<5;i++) if(*(pl+i)==*(p2+i)) cout<<*(p1+i); }A.H1B.HoC.10D.1

下列字符型常量Hello,world!表示方法中,错误的是______。A.[Hello,world!]B.'Hello,wOrld!'C.Hello,world!,D.{Hello,world!}

char*getmemory(void){ char p[]=”hello world”;return p;}void test(void){char *str=null;str=Getmemory();printf(str);} 请问运行 Test 函数会有什么样的结果.

下列程序的输出结果是( )。 #includediostream usingnamespacestd; intmain() { chara[]="Hell0,Test"; char*p=a; while(*p) { if(*p=a&&*p=z) coutchar(*p+A-a); elsecout*P; p++; } return0; }A.hello,testB.Hello,TestC.HELLO,TESTD.hELLO,tEST

void GetMemory(char *p){p = (char *)malloc(100);}void Test(void) {char *str= NULL;GetMemory(str); strcpy(str, "hello world");printf(str);}请问运行 Test 函数会有什么样的结果?

下面的程序各自独立,请问执行下面的四个TestMemory 函数各有什么样的结果?①void GetMemory(char * p){p = (char * )malloc(100);}void TestMemory (void){char *str = NULL;GetMemory (str);strcpy(str, "hello world");prinff(str);}② char * GetMemory (void){char p[ ] = "hello world";return p;}void TestMemory (void){char * str = NULL;str = GetMemory( );printf(str);}③void GetMemory(char * * p, int num){* p = (char * )malloc(num);}void TestMemory (void){char * str = NULL;GetMemory(str, 100);strcpy( str, "hello" );printf(sir);}④void TestMemory (void){char *str = (char * )malloe(100);strepy (str, "hello" );free ( str );if(str ! = NULL){strepy( str, "world" );printf(str);}}

变量s的定义为“char *s="Hello world!";”,要使变量p指向s所指向的同一个字符串,则应选取(47)。A.char *p=s;B.char *p=s;C.char *p;p=*s;D.char *p; p=s;

设char str1[11]="HELLO,",str2[10]=“world”;则执行语句cout 设char str1[11]="HELLO,",str2[10]=“world”;则执行语句 cout<<strlen(strcpy(str1,str2)));后的输出结果是 ______。A.12B.11C.7D.5

下列不合法的Python变量名是() A.Python2B.N.xC.sumD.Hello_World

假定s被定义为指针类型char *的变量,初始指向的字符串为"Hello world!",若要使变量p指向s所指向的字符串,则p应定义为()。Achar *p=s;Bchar *p=s;Cchar *p;p=*s;Dchar *p; p=s;

python中,’HELLO’*5的值是()A、"HELLOHELLOHELLOHELLOHELLO"B、""C、"HELLO"D、None

下列选项中,()是正确的表达式。 A、% String s = “hello world ” ;%  B、% = “hello world ” ;% C、% = “hello world ” %  D、% ! “hello world ” %

变量l=‘hello world!’,则l[2:5]的值是()A、llB、lloC、heD、hello

表达式’Hello world.I like Python.’.rfind(’python’)的值为()。

’python’-"python"()的值是()A、报错B、"Hello world"C、"hello World"D、"hello world"

单选题假定s被定义为指针类型char *的变量,初始指向的字符串为"Hello world!",若要使变量p指向s所指向的字符串,则p应定义为()。Achar *p=s;Bchar *p=s;Cchar *p;p=*s;Dchar *p; p=s;

单选题python中,’HELLO’*5的值是()AHELLOHELLOHELLOHELLOHELLOBCHELLODNone

单选题python中,p=‘hello world!’,则p[2:5]的值是()AllBlloCheDhello

单选题如何在警告框中写入 "Hello World"?()AalertBox=Hello World BmsgBox(Hello World) Calert(Hello World) DalertBox(Hello World)

单选题变量l=‘hello world!’,则l[2:5]的值是()AllBlloCheDhello

填空题表达式’Hello world.I like Python.’.rfind(’python’)的值为()。

单选题若有说明和语句:char str[]=Hello, *p; p=str;则此时*(p+5)中的值为(  )。A'\0'B'o'C'o'的地址D不确定的值