单项选择题
有以下程序:
#include <iostream>
#include <string>
usxng namespace std;
int main()
char p[] = "abcdefgh";
cout<<strlen(strcpy(p,"12345"))<<end1;
return 0;
执行后输出的结果是( )。
A.8
B.12
C.5
D.7
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有以下程序: #include<iostream> using namespace std; int f(int,int); int main() int i:1,x; x=f(i,i+1); cout<<x<<end1; return 0; int f(int a,int b) int c; c = a; if(a>b) c = 1; else if(a==b) c = 0; else c = -2; return c; 运行后的输出结果是( )。
A.1
B.0
C.-1
D.-2
点击查看答案&解析
单项选择题
下列各项中,属于面向对象程序设计语言不同于其他语言的主要特点的是( )。
A.继承性
B.消息传递
C.多态性
D.静态联编
点击查看答案&解析
相关试题
有以下程序: #include <iostream> u...
下列类的定义中,有( )处语法错误。 cl...
有以下程序: #include <iostream> u...
有以下程序: #include <iostream> u...
有以下程序: #include <iostream> u...