网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
有以下程序: include using namespace std; int main() {char a[10] = {'1','2','3',
有以下程序: #include<iostream> using namespace std; int main() { char a[10] = {'1','2','3','4','5','6','7','8','9','0'),*p; int i=8; p=a+i; cout<<p-3<<end1; return 0; } 执行程序后的输出结果是( )。
A.6
B.6789
C.'6'
D.789
参考答案
更多 “ 有以下程序: include using namespace std; int main() {char a[10] = {'1','2','3', 有以下程序: #include<iostream> using namespace std; int main() { char a[10] = {'1','2','3','4','5','6','7','8','9','0'),*p; int i=8; p=a+i; cout<<p-3<<end1; return 0; } 执行程序后的输出结果是( )。A.6B.6789C.'6'D.789 ” 相关考题
考题
以下程序的输出结果是【】。 include using namespace std; int main() {char S[]="abcde
以下程序的输出结果是【 】。include <iostream>using namespace std;int main(){char S[ ]="abcdef";s[3]='\0';cout<<s<<end1;return 0;}
考题
有以下面程序: include using namespace std; long fib(int n) { if (n>2)return (fi
有以下面程序:include <iostream>using namespace std;long fib(int n){if (n>2)return (fib(n-1)+fib(n-2));elsereturn 2;}int main(){cout<<fib(3)<<endl;return 0;}则该程序的输出结果应该是【 】。
考题
下列程序的输出结果是______。 include include using namespace std; voi
下列程序的输出结果是______。include<iostream.h>include<string.h>using namespace std;void fun(const char*s,char C) {c=s[strlen(s)/2];}int main(){char str[]="ABCDE";char ch=str[1];fun(str,ch);cout<<ch;return 0;}
考题
以下程序运行后的输出结果是【】。 include using namespace std; int main() {int i=10,
以下程序运行后的输出结果是【 】。include<iostream>using namespace std;int main(){int i=10,i:0;do{j=j+i;i--;}while(i>2);cout<<j<<end1;return 0;}
考题
若有以下程序段: include using namespace std; int main() {char*p="abcdefgh",*r;l
若有以下程序段:include <iostream>using namespace std;int main(){char*p="abcdefgh",*r;long*q;q=(long*)p;q++;r=(char*)q;cout<<r<<end1;return 0;}该程序的输出结果是【 】。
考题
有以下程序: include using namespace std; constxntN=5; int fun(char*s,char a,int
有以下程序:include <iostream>using namespace std;const xnt N=5;int fun(char *s,char a,int n){int j;*s=a;j=n;while(a<s[j])j--;return j;}int main(){char s[N+1];int k;
考题
程序的输出结果是【 】。 include using namespace std; class A{ int x; public: A(int
程序的输出结果是【 】。include <iostream>using namespace std;class A{int x;public:A(int x=1):x(x){cout<<x;}};void main(){A a,b(2),c(3);}
考题
有以下程序: include using namespace std; int main() {int i=010,j=10;cout
有以下程序:include <iostream>using namespace std;int main(){int i=010,j=10;cout<<(++i)<<","<<i--<<end1;return 0;}则该程序运行后的输出结果是【 】。
考题
下面程序运行输出的结果是【】。 include using namespace std; int main(){char a[]="C
下面程序运行输出的结果是【 】。include <iostream>using namespace std;int main(){char a[]="Chinese";a[3]='\0';cout<<a<<endl;return 0;}
考题
以下程序的输出结果是【】。 include using namespace std; int main() {int s,i;for(s=
以下程序的输出结果是【 】。include <iostream>using namespace std;int main(){int s,i;for(s=0,i=1;i<3;i++)s+=i;cout<<s<<end1;return 0;}
考题
有以下程序: include using namespace std; char *x[]={"First", "Second", "Third"
有以下程序: #include <iostream> using namespace std; char *x[]={"First", "Second", "Third" }; void f(char *z[ ]) { cout<<*z++<<end1; } int main ( ) { char **y; y=x; f(y); return 0; }A.产生语法错误B.FirstC.SecpndD.Third
考题
有以下程序:includeusing namespace Std;int main(){ int a = 15,b = 21,m = 0; swit
有以下程序: #include <iostream> using namespace Std; int main( ) { int a = 15,b = 21,m = 0; switch(a%3) { case 0: m++; break; case 1: m++; switch(b%2) {A.1B.2C.3D.4
考题
下面程序的运行结果为( )。include using namespace std;void main( ) { for(int a =0
下面程序的运行结果为( )。 #include <iostream> using namespace std; void main( ) { for(int a =0,x =0; !xa < =10; a ++ ); cout << a << endl;A.0B.1C.10D.11
考题
若有如下程序段: include using namespace std; int main() {char*p="abcdefgh",*r;l
若有如下程序段:include <iostream>using namespace std;int main(){char *p="abcdefgh",*r;long *q;q=(long *)p;q++;r=(char *)q;cout<<r<<end1;return 0;}该程序的输出结果是______。
考题
有以下程序,其输出结果是()。include using namespace std;int main(){ char a[10]={'
有以下程序,其输出结果是( )。 #include <iostream> using namespace std; int main(){ char a[10]={'1','2','3','4','5','6','7','8','9',0},*p; int i=8; p=a+i; cout<<p-3<<endl; return 0; }A.6789B.6C.789D.'6'
考题
若有以下程序: include using namespace std; int main() {char str[10];cin>>str;co
若有以下程序:include <iostream>using namespace std;int main(){char str[10];cin>>str;cout<< str<<end1;return 0;}当输入为:This is a program!那么执行程序后的输出结果是【 】。
考题
以下程序的输出结果是()。include using namespace std;int main(){ int a=1,b; switc
以下程序的输出结果是( )。 #include <iostream> using namespace std; int main(){ int a=1,b; switch(a){ case 1:b=30; case 2:b=20; case 3:b=10; default:b=0; } cout<<b<<endl; return 0; }A.30B.20C.10D.0
考题
有以下程序: include using namespace std; int main() {int x;for(int i=1;i
有以下程序: #include <iostream> using namespace std; int main() { int x; for(int i=1;i<=100;i++) { x=i; if (++x%2==0) if (++x%3==0) if (++x%7==0) cout<A.39,81B.42,84C.26,68D.28,70
考题
有以下程序:include include using namespace std;int main ( ){ ofstream
有以下程序: #include <iostream> #include <fstream> using namespace std; int main ( ) { ofstream ofile; char ch; ofile.open ("abc.txt"); cin>>ch; while (ch!='#' ) { cin>>ch; ofile.put(ch);A.程序编译时出错B.abc#C.abcD.#
考题
以下程序的执行结果为【】。 include using namespace std; void overload(int num) {cou
以下程序的执行结果为【 】。include<iostream>using namespace std;void overload(int num){cout<<num<<end1;}void overload(char ch){char c=ch+1;cout<<c<<end1;}int main(){overload('X');return 0;}
考题
有以下程序include using namespace std;int a;int fun ();int main (){extern int a
有以下程序#include <iostream>using namespace std;int a;int fun ();int main (){ extern int a; int b; a = 100; b = fun(); cout<<b<<end1; return 0;}int fun{){ extern int a; return (10*a ;} 其程序运行后的输出结果是A.100B.10C.1000D.10000
考题
有以下程序: include include using namespace std; int main() {char arr[
有以下程序: #include<iostream> #include<string> using namespace std; int main() { char arr[2][4]; strcpy(arr[0],"you"); strcpy(arr[1],"me"); arr[0][3]=''; cout<<arr[0]<<end1; return 0; } 执行后的输出结果是( )。A.youmeB.youC.meD.err
考题
有以下程序:include include using namespace std;int main ( ){ char b1[8
有以下程序: #include <iostream> #include <string> using namespace std; int main ( ) { char b1[8] = "abcdefg"; char b2[8],*pb=b1+3; while (--pb>=b1) strcpy (b2, Pb) ; cout<<strlen (b2) <<end1; return 0; } 程序运行后的输出结果是( )。A.8B.3C.1D.7
考题
有下列程序段:include using namespace std;int main() { char b[]= "Hello,you"; b[
有下列程序段: #include <iostream> using namespace std; int main() { char b[] = "Hello,you"; b[5] = 0; cout<<b<<end1; return 0; } 执行此程序后,得到的输出结果是( )。A.Hello,youB.Hello0youC.HelloD.0
考题
有以下程序:include using namespace std;int main ( ){ char s1[10],s2[10]; char*p
有以下程序: #include <iostream> using namespace std; int main ( ) { char s1[10],s2[10]; char *p=s1,*q=s2; cin>>s1>>s2; while (*p ! =' \0 ' ) p++; while (*q!='\0') *p++=*q++; *p='\0'; cout<<s1<<end1; return 0; }A.abcd0ghijB.abcd0ghij0C.abcdD.abcdghij
考题
有以下程序:include include using namespace std;int main (){ char s[]="
有以下程序: #include <iostream> #include <string> using namespace std; int main () { char s[]="\n123\\"; cout<<strlen (s) <<", "<<sizeof (s) <<end1; return 0; }A.赋初值的字符串有错B.6,7C.5,6D.6,6
考题
有以下程序 include using namespace std; long fib(int n) { if(n>2) return(fib(n-1
有以下程序include<iostream>using namespace std;long fib(int n){if(n>2)return(fib(n-1)+fib(n-2));elsereturn 2;}int main( ){cout<<fib(3)<<endl;return 0;}则该程序的输出结果应该是______。
热门标签
最新试卷