更多"设有如下程序段: char str[]='World': char"的相关试题:
[单项选择]设有如下程序段:
char str[]=”World”;
char*ptr=str;
执行上面的程序段后,*(ptr+5)的值为 ______。
A. ‘o’
B. ‘0’
C. 不确定的值
D. ‘o’的地址
[单项选择]设有下列的程序段:
char str[]="Hello World";
char*ptr;
ptr=str;
执行上面的程序段后,*(ptr+10)的值为( )。
[单项选择]设有如下的程序段:
char str[]="Hello";
char *ptr;
ptr=str;
执行完上面的程序段后,*(ptr+5)的值为( )。
[单项选择]设有如下的程序段:
char str[]="HelloWorld";
char*ptr;
ptr=str;
执行上面的程序段后,*(ptr+10)的值为( )。
[单项选择]设有下列程序段:
char str[]="HelloWorld";
char*ptr;
ptr=str;
执行上面的程序段后,*(ptr+10)的值为( )。
[单项选择]设有下列程序段:
char str[]="HelloWorld";
char *ptr;
ptr=str;
执行上面的程序段后,*(ptr+10)的值为( )。
[单项选择]设有下列的程序段:
char str[]="HelloWorld";
char*ptr;
ptr=str;
执行上面的程序段后,*(ptr+10)的值为( )。
[单项选择]以下程序段的输出结果是( )。
char str[] = "BCDE",*ptr=str;
cout<<*(p+4)<<end1;
A. 字符E的地址
B. 0
C. 69
D. 不确定
[单项选择]以下程序段输出的结果是( )。
char str[]="BCDE",*ptr=str;
cout<<*(ptr+4)<<endl;
A. 0
B. 69
C. 字符E的地址
D. 一个空字符
[单项选择]设char str1[11]="HELLO,",str2[10]=“world”;则执行语句
cout<<strlen(strcpy(str1,str2)));后的输出结果是 ______。
A. 12
B. 11
C. 7
D. 5
[单项选择]有如下的程序段,该程序段执行完后,共执行的循环次数是
total=0
Counter=1
Do
Print Counter
total=total * Counter + 1
Print total
Counter=Counter +1
If total > 10 Then
Exit Do
End If
Loop While Counter<=10
A. 4
B. 10
C. 15
D. 20