下面程序的运算结果为()。includevoid fun();int main(){int a=10;fun();printf("%3d",a);return 0;}void fun(){int a=20;printf("%3d",a);}
A.20 10
B. 10 10
C. 10 20
D. 20 20
时间:2024-03-20 16:48:49
相似题目
-
下面程序的运行结果是______。#include#includevoidmain(){charp1[50]=”abc”,*p2,str[50]=abc
-
下面程序段的运行结果是( )注意输出结果的格式#include void main(){char *p=”abcdefgh”;p+=3;printf(%s\n,p);}
-
下面程序的输出结果是( )。 #include int main() { int s=023; printf(\%d\\n\,--s); return 0; }
-
下面程序的输出结果是( ).#include \string.h\main( ){ char *p1=\abc\,*p2=\ABC\,str[50]= \xyz
-
下面程序的运行结果是______。 #include < stdio.h > #include < string.h > main() { char a[7]=\abcdef\,b[4]=\ABC
-
以下程序的功能是进行位运算:include <stdio.h>main() unsigned char a,b; a =7∧3; b = ~4&3; printf("% d %d \n" ,a,b);}程序运行后的输出结果是()。
A.4 3
B.7 3
C.7 0
D.4 0
-
下面程序的运行结果为#include<iostream.h>void main( )char a='3';switch(
A.
 
-
下面程序的运行结果是()。 include<iostream.h
A.12 12
B.12 21
C.21 12
D.21 21
-
下面程序的结果为 include<iostream.h> int c; class A { private: int a; static int b; public: A() {a=0;c=0;} void seta(){a++;} void setb(){b++;}
A.1 2 1
B.1 2 2
C.1 1 2
D.2 2 2
-
下面程序的运行结果是()。include<iostream.h> void main{int num=1:int&ref=num; ref
下面程序的运行结果是()。
include<iostream.h> void main
{
int num=1:
int&ref=num; ref=ref+2:
cout<<num: num=num+3: cout<<ref<<endl:
}
A.13
B.16
C.36
D.33
-
下面程序的运行结果是()。 include<iostream.h> void fun(int *a,int *B. { int x=*a
下面程序的运行结果是()。 include<iostream.h> void fun(int *a,int *B. { int x=*a: *a=*b;*b=X; cout<<*a<<*b<<””: void main { int X=1,Y=2; fun(&x,&y); cout<<x<<Y<<endl; }
A.12 12
B.12 21
C.21 12
D.21 21
-
下面程序的结果为()。include<iostream.h>void change(int a,int b){int temp;temp=a;a=b;b=temp
下面程序的结果为()。 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 void main { char a=’3’: switch(8) { case 3:cout$amp;A.3
B.321
C.31
D.32
-
写出下面程序执行后的运行结果。 include <stdio.h> define N 2 define M N+1 define N
写出下面程序执行后的运行结果。 include <stdio.h> define N 2 define M N+1 define NUM 2*M+1 int main() { int i; for(i=1;i<=num;i++) printf("%d",i); return 0; }>
-
下面程序的运行结果是【】。 include<iostream> using namespace std; void fun(int&a,int b=3)
下面程序的运行结果是【 】。
include <iostream>
using namespace std;
void fun(int &a, int b=3)
{
static int i=2;
a = a + b + i;
i = i + a;
}
int main()
{
int x=5, y=2;
fun(x, y);
cout<<x<<",";
fun(x);
cout<<x<<end1;
return 0;
}
-
下面程序的运行结果为 include<iostream.h> void main() { for(int a=0,x=0;! x&&a<=10;a++) { a++; } cout<<a<<end1; }
A.10
B.11
C.12
D.0
-
下面程序的运行结果为()。 include<iostream.h> voidmain() { chara=3: switch(a) {
下面程序的运行结果为()。 include<iostream.h> voidmain() { chara=3: switch(a) { case3:cout<<"3"; case2:cout<<"2";break; default:cout<<"1"; } }
A.3
B.321
C.31
D.32
-
下面程序的运行结果是()。 include<iostream.h> int fun(int a[],int n) { int resuh=1
下面程序的运行结果是()。 include<iostream.h> int fun(int a[],int n) { int resuh=1; for(inl i=1;i<11;1‘++) result=result * a[i]; retum result; } void main int a[3]={3,4,5}: cout<<fun(a,3)<<endl: }
A.12
B.15
C.20
D.60
-
下面程序的运行结果为include<iostream,h>Void 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,3
B.3,2
C.2,2
D.3,3
-
下面程序段的运行结果是 include<iostream.h> void main() {char*s="abcde"; S+=2;
下面程序段的运行结果是 include<iostream.h> void main() { char*s="abcde"; S+=2; cout<<&s;}
A.cde
B.字符'c'
C.字符'c'的地址
D.无确定的输出结果
-
给出下面程序的运行结果。include<stdio.h>intmain();return0;}
A.6
B.3
C.4
D.5
-
下面程序运行后输出的结果为: include int main(); return 0; }
-
下面程序段的运行结果是__________。 include<stdio.h>main(); t ++ ; } }
A.EXAMPLE!
B.example!
C.EXAM
D.example
-
下面程序的输出结果为()。 include<string.h> void main() char p1[7]="abc",p2 ="ABC",str[50]="xyz"; strcpy(str,strcat(p1,p2)); printf("%s",str);
A.xyzabcABC
B.abcABC
C.xyzabc
D.xyzABC