请写出以下程序的运行结果main(){ int x=2 , y=-1 , z=2 ;if (xif(y<0) z=0 ;else z+=1 ;printf(“%d\n”, z) ;}运行结果为:
写出以下程序的运行结果。
#include int fun(int a){int b=0;static int c=3;b ; c ;return(a b c);}
main(){int i, a=5;for (i=0; i<3; i )cout<< i<< " "<< fun(a)<< " ";}
请写出以下程序的运行结果
#define MAX(a , b , c)
((a)>(b)?((a)>(c)?(a):(c)): ((b)>(c)?(b): (c)))
main()
{ int x , y , z ;
x=1;y=2;z=3
printf(“%d,”,MAX(x , y , z));
printf(“%d,”,MAX(x+y , y , y+x));
printf(“%d\n”,MAX(x , y+z , z)); }
运行结果:
写出以下程序运行的结果。
main()
{char cl='a',c2='b',c3='c',c4='\101',c5='\116';
printf("a%cb%c\tc%c\tabc\n",c1,c2,c3):
printf("\t\b%c%c",c4,c5):
}
请写出下面程序的运行结果: public class Test extends TT{ public static void main(String args[] Test t=new Test ("Tom."); } public Test(String s){ super (s); System.out.print("How are you?"); } public Test(){ this("I am Jack."); } } class TT{ public TT(){ System.Out.print ("Hi!"); } public TT(String s){ this (); System.out.print("I am"+s); } } 结果:【 】。
阅读下列程序,写出程序运行结果。
import j ava. util. StringTokenizer;
public class C3301
{
public static void main(String[] args)
{
String ss="public static void main";
StringTokenizer pas=new StringTokenizer(ss, " ") ;
int n=pas. countTokens() ;
System. out. println(n) ;
String s=pas. nextToken() ;
for(pas. nextToken() ; pas. hasMorcTokens() ; s=pas. nextToken()
System. out. println(s) ;
}
}
写出程序运行结果
int sum(int a)
{
auto int c=0;
static int b=3;
c+=1;
b+=2;
return(a+b+C);
}
void main()
{
38
int I;
int a=2;
for(I=0;I<5;I++)
{
printf("%d,", sum(a));
}
}
写出程序的运行结果。
#include
main()
{int a, b;
scanf ("%d%d", &a, &b);
if (a>=h) printf("Yes");
printf (" a+h =%d\n", a+h );
}
如果输入:a=6,b=8,则输出结果是___________