题目内容

以下程序的输出结果是()。#include"stdio.h"int f(int x){int y;if(x==0||x==1) return (3);y=x*x-f(x-2);return y;}main( ){int z;z=f(3); printf("%d\n",z);}

A. 0
B. 9
C. 6
D. 8

查看答案
更多问题

以下程序的输出结果是()。#includeint fun(int a,int b){ if(b= =0) return a;else return(fun(- -a,- -b));}main( ){ printf("%d\n",fun(4,2));}

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

下面程序的输出结果是 。#include long fun (long s){long t,sl=10;t = s % 10;while (s > 0){s = s/100;t = s%10*sl + t;sl = sl * 10;}return t;}main( ){long s=7654321,t;t=fun(s);printf("t=%ld\n", t);}

下面程序的输出结果是。#includevoid t(int x,int y,int cp,int dp){ cp=x*x+y*y;dp=x*x-y*y;}main( ){ int a=4,b=3,c=5,d=6;t(a,b,c,d);printf("%d%d \n",c,d);}

下面程序的输出结果是。#includeintfunc(inta,intb){intm=0,i=2;i+=m+1;m=i+a+b;returnm;}main(){intk=4,m=1,p;p=func(k,m);printf("%d,",p);p=func(k,m);printf("%d\n",p);}

答案查题题库