题目内容

下面程序的输出结果是( )。 #includeusing namespace std; void fun(int *s,int *y){ static int t=3; *y=s[t]; t--;}void main(){ int a[]={1,2,3,4}; int i,x=10; for(i=0;i<4;i++) { fun(a,&x); cout<

A. 1,2,3,4
B. 0,0,0,0
C. 4,4,4,4
D. 4,3,2,1

查看答案
更多问题

下面程序的输出结果是( )。 #includeusing namespace std;int fun(char *s){ char *p=s; while(*p!='\0') p++; return (p-s);}void main(){ cout<

A. 20
B. 6
C. 19
D. 0

下面程序的输出结果是( )。 #includeusing namespace std;int x=10;void fun(int ) ;void main(){ fun(x); cout<<"x="<

A. x=0
B. x=1
C. x=10
D. 语法错误,不能输出正确结果

下面程序的执行结果是( )。 #includeusing namespace std;void main(){ void swap(); extern int a,b; a=3; b=10; swap(); cout<<"a="<

A. a=3,b=10
B. a=10,b=3
C. a=temp,b=temp
D. 语法错误,不能输出正确结果

在横线处填上适当的语句( ),使下面程序执行结果是13,18,23。#includeusing namespace std; int add(int x,int y=8);void main(){ ; cout<

A. int a=3
B. int b=3
C. int a=5
D. int b=5

答案查题题库