[主观题]

以下程序运行后的输出结果是()。 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 st

[单选题]以下程序执行后的输出结果是include using namespace std;void try(int,int,int,int)以下程序执行后的输出结果是 #include <iostream> using namespace std; void try(int,int,int,int); int main () { int x,y,z,r; x =1 ; y = 2; try(x,y,z,r); cout<<r<<endl; return 0; } void try(int x,int y

  • 查看答案
  • 以下程序的输出结果是()。 include using namespace st

    [主观题]以下程序的输出结果是()。 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

    [单选题]有以下程序,其输出结果是()。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; retur

  • 查看答案
  • 以下程序的输出结果是#include using namespace std;i

    [单选题]以下程序的输出结果是include using namespace std;int main(){cout.fill('*');cout.以下程序的输出结果是#include <iostream>using namespace std;int main(){ cout.fill('*'); cout.width(5); cous<<hex<<100<<end1; return 0;}A.**100B.***64C.100**D.64***

  • 查看答案
  • 执行下面程序后输出的结果是()。#include using namespace

    [单选题]执行下面程序后输出的结果是()。include using namespace std;int main(){ int a[4][4执行下面程序后输出的结果是( )。 #include <iostream> using namespace std; int main(){ int a[4][4]={{1,2,3,-4},{7,-12,-13,8},{-21,9,0,-24},{-31,10,-33,11}}; int i,j,s=0; for(i=0;i<4;i++){ for(j=0;j<4;

  • 查看答案
  • 下列程序的输出结果是( )。 #include using namespace

    [单选题]下列程序的输出结果是( )。 include using namespace std; int main() {下列程序的输出结果是( )。 #include<iostream> using namespace std; int main() { char a[]="Hello,Test"; char *p=a; while(*p) { if(*p>='a'&&*p<='z') cout<<char(*p+'A'-'a'); else cout<<*p; p+

  • 查看答案
  • 下面程序输出的结果是( )。 #include using namespace

    [单选题]下面程序输出的结果是( )。 include using namespace std; void swap(int下面程序输出的结果是( )。 #include <iostream> using namespace std; void swap(int &a,int &b){ int temp; temp=a; a=b; b=temp; } void main(){ int x=2; int y=3; swap(x,y); cout<<x<<y; }A.23B.32C.abD.

  • 查看答案
  • 下列程序的输出结果是( )。 #include using namespace

    [单选题]下列程序的输出结果是( )。 include using namespace std; class TestClass下列程序的输出结果是( )。 #include<iostream> using namespace std; class TestClass{ static int i; public: TestClass(){i++;} ~TestClass(){i--;} static int getVal(){return i;} }; int TestClass::i=O; void f

  • 查看答案
  • 下列程序的输出结果是()。include using namespace std

    [主观题]下列程序的输出结果是()。include using namespace std;int main(){ int i=5; int &下列程序的输出结果是[ ]。include <iostream>using namespace std;int main(){int i=5;int &r=i; r=7;cout<<i<<end1;return 0;}

  • 查看答案
  • 下列程序的输出结果是 #inClUde using namespace std;

    [单选题]下列程序的输出结果是 inClUde using namespace std; intmain() { Char a[]="HellO,W下列程序的输出结果是#inClUde<iostream>using namespace std;intmain(){C.har a[]="HellO,World";C.har*ptr=a;while(*ptr){if(*ptr>='a'&& *ptr <='Z')cout<<char(*ptr+'A' -'a');else

  • 查看答案
  • 以下程序运行后的输出结果是()。 include using namespace