[单选题]

下面程序的结果为( )。 #include"iostream.h" void change(int a,int b) { int temp; temp=a; a=b b=temp; } void main() { int m,n; m=8; n=9; change(m,n); cout<<m<<" "<<n<<endl; }

A.89

B.98

C.程序有错误

D.99

参考答案与解析:

相关试题

下面程序的结果为()。#include"iostream.h"void chan

[单选题]下面程序的结果为( )。 #include"iostream.h" void change (int a,int b) { int temp; temp=a; a=b; b=temp: } void main() { int m,n; m=8; n=9; change(m,n): cout << m<<" "<< n << endl; }A.89B.98C.程序有错误D.99

  • 查看答案
  • 下面程序的结果为#include"iostream.h"void change(

    [单选题]下面程序的结果为 #include"iostream.h" void change(int a,int B) { int temp; temp=a; a=b; b=temp; } void main() { int m,n; m=8; n=9; change(m,n); cout<<m<<" "<<n<<endl; }A.8 9B.9 8C.程序有错误D.9 9

  • 查看答案
  • 下面程序的结果是#include"iostream.h"void main(){

    [单选题]下面程序的结果是 #include"iostream.h" void main() { char*str; Str="test!"; cout<<str[5]; }A.程序错误B.!C.'/0'D.为空字符

  • 查看答案
  • 下面程序的结果是()。#include"iostream.h"void main

    [单选题]下面程序的结果是( )。 #include"iostream.h" void main() { char *str; Str="test!"; cout<<str[5]; }A.程序错误B.!C.'/0'D.为空字符

  • 查看答案
  • 下面程序的结果是#include"iostream.h"void main()

    [单选题]下面程序的结果是 #include"iostream.h" void main() { char*str; str="test!"; cout<<str[5]; }A.程序错误B.!C.’/0’D.为空字符

  • 查看答案
  • 下面程序的执行结果是#include"iostream.h"void main(

    [单选题]下面程序的执行结果是 #include"iostream.h" void main() { int * p,r; p=new int; *p=20; r=sizeof(*p); cout<<r<<endl; delete p; }A.程序错误B.内存为20地址的大小C.20D.4

  • 查看答案
  • 程序 include" iostream.h" void main( ) { i

    [主观题]程序include" iostream.h"void main( ){int i=10;jnt j=5;cout < < j+i++ < < end1;}的结果为[ ]

  • 查看答案
  • 有如下程序:#include"iostream.h"void main(){in

    [单选题]有如下程序: #include"iostream.h" void main() { int x=1,a=0,b=0; swish(X){ case 0:b++; case 1:a++; case 2:a++;b++; } cout<<"a="<<a<<","<<"b="<<b; } 该程序的输出结果是A.a=2,b=1B.a=1,b=1C.a=1,b=0D.a=2,b=2

  • 查看答案
  • 有以下程序:#include"iostream.h"void main(){in

    [单选题]有以下程序: #include"iostream.h" void main() { int i=1,j=1,k=2; if((j++||k++)&&i++) cout<<i<<","<<j<<","<<k; cout<<endl; } 执行后输出结果是A.1,1,2B.2,2,1C.2,2,2D.2,2,3

  • 查看答案
  • 有以下程序#include"iostream.h"void main( ){in

    [单选题]有以下程序 #include"iostream.h" void main( ) { int i=1,j=1,k=2; if((j++||k++)&&i++) cout<<i<<","<<j<<","<<k; cout<<endl; } 执行后输出结果是A.1,1,2B.2,2,lC.2,2,2D.2,2,3

  • 查看答案
  • 下面程序的结果为()。#include"iostream.h"void chan