A.a=1,b=2
B.a=2,b=1
C.a=1,b=1
D.a=2,b=2
[单选题]下面程序的运行结果为includeVoid swap(int &a,int b){int temp;temp=a£«£«;a=b;下面程序的运行结果为 #include<iostream,h> Void swap(int &a,int b) { int temp; temp=a++; a=b; b=temp; } void main() { int a=2,b=3; swap(a,b); cout <<a <<”,” <<b <<end1 }A.2,3B.3,2C.2,2D.3,
[单选题]若输入60和13,以下程序的输出结果为 ( ) # define SURPLUS (a,b)((a)%(b)); main ( ) { int a,b; scanf("%d,%d",&a,&b); printf("/n",SURPlUS(a,b)); }A.60B.13C.73D.8
[试题]下列程序运行时 , 若输入 labcedf2df< 回车 > 输出结果为( 1 0 )#include <stdio.h>main(){ char a=0,ch;while((ch=getch ar ())!='/n'){ if(a%2!=0&&(ch>='a'&&ch<='z')) ch=ch-'a'+'A';a++; putchar(ch);}printf("/n");}
[单选题]下面程序的运行结果为()。includevoid swap(int &a,int B) {int temp;temp=a£«£«;下面程序的运行结果为( )。 #include<iostream.h> void swap(int &a,int B) { int temp; temp=a++; a=b; b=temp; } void main() { int a=2,b=3; swap(a,b); cout<<a<<“,”<<b<<end1; }A.2,3B.3,2C.2,2D.3
[单选题]运行下列程序时,若输入的数据为“1,2,3”,则输出结果是( )。 main() { float a,b,c,t; scanf("%f,%f,%f",&a,&b,&c); if(a<b) {t=a;a=b;b=t;} if(a<c) {t=a;a=c;c=t;} if(b<c) {t=b;b=c;c=t;) printf("%f/n%f/n%f/n",a,b,c); }A.1B.1.00 2.00 3.00 3.00 2.00C.1D.3.000000 3 2.0
[单选题]运行下列程序时,若输入的数据为“1,2,3”,则输出结果是( )。main(){ float a,b,C,t;scanf("%f,%f,%of",&a,&b,&C) ;if(a<B){t=a;a=b;b=t;}if(a<C){t=a;a=c;c=t;}if(b<C){t=b;b=c;c=t;}printf("%f/n%f/n%f/n",a,b,C) ;}A.1.00 2.00 3.00B.1.00 3.00 2.00C.1 3 2D.3.000000 2.0000
[主观题]以下程序的运行结果是()。define MAX(a,b)(a>b?a:b)+1main(){ int i=6,j=8,k;printf("%d/n",MAX(i,j));}
[单选题]以下程序的运行结果是()。includemain(){int a[]={1,2,3,4,5,6,7,8,9,10,11,12}; int *以下程序的运行结果是( )。 #include <stdio.h> main() { int a[]={1,2,3,4,5,6,7,8,9,10,11,12}; int *p=a+5,*q=NULL; *q=8(p+5); printf("%d %d/n", *p,*q); }A.运行后报错B.6 6C.6 11D.5 5
[单选题]程序运行结果为______。#define R 3.0#define PI 3.1415926#define L 2*PI*R#define S PI*R*Rmain(){ printf("L=%f S=%f/n",L,S);}A.L=18.849556 S=28.274333B.18.849556=18.849556 28.274333=28.274333C.L=18.849556 28.274333=28.274333D.18.849556=18.849556 S=28.274333
[单选题]下面程序的运行结果为 include void swap(int &a, int b) { int temp; temp=a下面程序的运行结果为#include<iostream.h>void swap(int &a, int b){int temp;temp=a++;a=b;b=temp;}void main( )int a=2,b=3;swap(a, b) ;cout < < a < <"," < < b < < endl;}A.2,3B.3,2C.2,2D.3,3