下面程序的输出结果是【】。char b[]="ABCD";main(){char b[30];strcpy(&b[0],"GH");strcpy(&am
下面程序的输出结果是【 】。
char b[]="ABCD";
main()
{
char b[30];
strcpy(&b[0],"GH");
strcpy(&b[1],"GH");
strcpy(&b[2],"GH");
printf("%s\n",b);
}
下面程序的输出结果是【 】。
char b[]="ABCD";
main()
{
char b[30];
strcpy(&b[0],"GH");
strcpy(&b[1],"GH");
strcpy(&b[2],"GH");
printf("%s\n",b);
}
以下程序运行后的输出结果是______。 main() { char a[]="Language",b[]="Programe"; char *p1,*p2; int k; p1=a;p2=b; for(k=0;k<=7;k++) if(*(p1+k)==*(p2+k)) printf("%c,*(p1+k)); }
下列程序的输出结果是______。
include<iostream.h>
void main()
{
char a[]="abcdabcabfgacd";
int i1=0,i2=0,i=0;
while(a[i])
{
if(a[i]=="a")i1++;
if(a[i]=="b")i2++;
i++;
}
cout<<i1<<""<<i2<<endl;
}
A.xyabcAB
B.abcABz
C.ABabcz
D.abcdABCD
A.LANGUAGE
B.language
C.LAN
D.langUAGE
A.7 0
B.0 7
C.1 1
D.43 0
A.ABCDE\0FG\0IJK
B.ABCDIJK
C.IJK
D.EFGIJK
A.6 1
B.7 0
C.6 3
D.7 1
有以下程序
#include<stdio.h>
#include<string.h>
main()
{char a[10]=”abcd”;
prinff(“%d,%d\n”,strlen(A),sizeof(A));
}
程序运行后的输出结果是
A.7,4
B.4,10
C.8,8
D.10,lO
下面程序段的运行结果是 char str[]="ABC",*p=str; printf("%d\n",*(p+3));
A.67
B.0
C.字符'C'的地址
D.字符'C'
A. 123
B. 321
C. 213
D. 312
下面程序的运行结果是()。 #include<iostream> using namespace std; class A { public: virtual~A() { cout<<"call A::~A()"<<endl;} }; class B:public A { char * p; public: B(int i) { p=new char[i];} ~B() { delete(p); cout<<"call B::~B()"; } }; void main() { A * a=new B(8); delete a; }
A.call B::~B()call A::~A()
B.call B::~B()
C.call A::~A()
D.call A::~A()call B::~B()