单选题:Consider the following functions definition, which one is correc
Consider the following functions definition, which one is correct ?
@[D](2)
A. double fun(int x,int y)
{z=x+y;return z;}
B. fun(int x,y)
{int z;
return z;}
C. fun(x,y)
{int x,y;double z;
z=x+y;return z;}
D. double fun(int x,int y)
{double z;
z=x+y;return z;}
A.double fun(int x,int y)
{z=x+y;return z;}
B.fun(int x,y)
{int z;
return z;}
C.fun(x,y)
{int x,y;double z;
z=x+y;return z;}
D.double fun(int x,int y)
{double z;
z=x+y;return z;}
答案:D
@[D](2)
A. double fun(int x,int y)
{z=x+y;return z;}
B. fun(int x,y)
{int z;
return z;}
C. fun(x,y)
{int x,y;double z;
z=x+y;return z;}
D. double fun(int x,int y)
{double z;
z=x+y;return z;}
A.double fun(int x,int y)
{z=x+y;return z;}
B.fun(int x,y)
{int z;
return z;}
C.fun(x,y)
{int x,y;double z;
z=x+y;return z;}
D.double fun(int x,int y)
{double z;
z=x+y;return z;}
答案:D