单项选择题

有如下程序: #include <stdio.h> int func(int a,int b) { return(a+b):} main() { int x=2,y=5,z=8,r; r=func(func(x,y),z); printf("%d\n",r); } 该程序的输出结果是( )。

A.12
B.13
C.14
D.15
<上一题 目录 下一题>
热门 试题

单项选择题
有以下程序: #include <stdio.h> void fun(int a,int b,int c) { a=456,b=567,c=678;} main() { int x=10,y=20,z=30; fun(x,y,z); printf( %d,%d,%d n ,x,y,z); } 此程序的输出结果是( )。
A.30,20,10
B.10,20,30
C.456,567,678
D.678,567,456
单项选择题
下列程序的输出结果是( )。 #include <stdio.h> struct abc { int a, b, c, s;}; main() { struct abc s[2]={{1,2,3},{4,5,6}}; int t; t=s[0].a+s[1].b; printf( %d n ,t); }
A.5
B.6
C.7
D.8
相关试题
  • 以下程序的功能是:删去一维数组中所有相同...
  • 以下程序的输出结果是 【18】 。#incl...
  • 设有以下定义和语句,则*(*(p+2)+...
  • 下面函数要求计算两个整数x,y之和,并通过...
  • 下面程序的运行结果是 【17】 。#incl...