下面程序的输出结果是________________ #include int x,y; f( ) { int y,a=25,b=10; x=a+b; y=a-b; return; } void main( ) { int a=9,b=5; x=a+b; y=a-b; f( ); printf(“%d,%d\n”,x,y); }
举一反三
- 以下程序输出结果为:#include<;stdio.h>;int num(int x,int y){int a,b;a=x+y;b=x-y;}int main(){int a=3,b=2;int x,y;x=a+b;y=a-b;num(a,b);printf("%d",a);return 0;}
- 以下程序没有语法问题的是() A: B: include<;stdio.h>;int main( ){int x , y = 5 ; printf( "%d\n" , x / y ) ; return 0 ;} C: D: include<;stdio.h>;int main( ){int x = 3 ;y = 5 ; printf( "%d\n" , x / y ) ; return 0 ;} E: F: include<;stdio.h>;int main( ){int x = 3 ,y ; printf( "%d\n" , x / y ) ;y = 5; return 0 ;} G: H: include<;stdio.h>;int main( ){int x = 3 , y = 5 ; printf( "%d\n" , x / y ) ; return 0 ;}
- 下面程序的运行结果是a=____,b=____。#include<;stdio.h>;int main( ){void f( int x , int y ) ;int a = 1 , b = 2 ;f( a , b ) ;printf( "a=%d,b=%d\n" , a , b ) ;return 0 ;}void f( int x , int y ){x = 100 ;y = 200 ;}
- #include [stdio.h] int x,y; int f(int x){ y=x++; printf("%d",y); } int main(void){ int x=5; f(x); f(x); return 0; }
- 以下程序的执行结果为________。 #include "stdio.h" float fun(int x,int y) { return(x*y); } main() { int a=2,b=5,c=8; printf("%.0f",fun((int)fun(a+b,c),a-b));}