下面程序的运行结果是 ______。
include<iostream.h>
void main()
{
char str[]="SSSWLIA",c;
int k;
for(k=2;(c=str[k]!='\0';k++)
{
switch(c)
{
case'I':++k;break;
case'l';continue;
default;c
第1题:
【填空题】下面程序的运行结果是 。 #include<stdio.h> main() {char str[]="SSSWLIA",c; int k; for(k=2;(c=str[k])!='0';k++) {switch(c) {case 'I':++k;break; case 'L':continue; default:putchar(c);continue; } putchar('*'); } }
第2题:
下面程序的结果是 #include" iostream.h" void main( ) { char * str; Str="test!"; cout < < str[5]; }
A.程序错误
B.!
C.'\0'
D.为空字符
第3题:
下面程序的结果是( )。 #include"iostream.h" void main() { char*str: str="test!"; cout<<str[5]: }
A.程序错误
B.!
C.'\0'
D.为空字符
第4题:
下面程序的结果是 #include"iostream.h" void main() { char*str; Str="test!"; cout<<str[5]; }
A.程序错误
B.!
C.'\0'
D.为空字符
第5题:
下面程序的结果是 #include"iostream.h" void main() { char*str; str="test!"; cout<<str[5]; }
A.程序错误
B.!
C.’\0’
D.为空字符
第6题:
下面程序的结果是 #include"iostream.h" void main( ) { char * str; str="test!"; cout<<str[5]; }
A.程序错误
B.!
C.'\0'
D.为空字符
第7题:
下列程序的运行结果是______。
include<iostream.h>
class Base
{
public:
void f(int x){cout<<“Base:”<<x<<endl;}
);
class Derived:public Base
{
public:
void f(char*str){cout<<“Derived:”<<str<<endl;}
};
void main(void)
{
Base*pd=ne
第8题:
下面程序的结果是( )。 #include"iostream.h" void main() { char *str; Str="test!"; cout<<str[5]; }
A.程序错误
B.!
C.'\0'
D.为空字符
第9题:
下面程序的结果是( )。#include<iostream.h>void main(){char *str;str="test!";cout<<str[5];}
A.程序错误
B.!
C.'\0'
D.为空字符