写出以下程序运行的结果。 main() {char cl='a',c2='b',c3='c',c4='\10
写出以下程序运行的结果。
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):
}
写出以下程序运行的结果。
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):
}
第1题
第2题
第3题
第4题
写出以下程序的运行结果。
#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)<< " ";}
第5题
请写出以下程序的运行结果
#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)); }
运行结果:
第6题
写出程序的运行结果。
#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,则输出结果是___________
第7题
写出程序运行的结果。
main()
{int i,j,m,n;
i=8;
j=10;
m=++i;
n=j++;
printf("%d,%d,%d,%d,"i,j,m,n);
}
第8题
写出程序的输出结果。
#include
main()
{ìntk=lO; char c="b"';
do
swith(c++)
{ case'a':k++;
case'b':k--;
case'c' :k+=3;break;
case'd',:k=k%4;
}
while(c! ='c');
printf("%d\n",k );
}
运行结果是:____________
第9题
请写出下面程序的运行结果: 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); } } 结果:【 】。
第10题