-->
当前位置:首页 > 题库

填空题:阅读下面程序,写出程序的运行结果。

Luz4年前 (2022-05-22)题库839
阅读下面程序,写出程序的运行结果。
c
#include <stdio.h>
int s = 5;
int func();
int main()
{
int a, s;
s = func();
a = func();

printf("s=%d, a=%d", s, a);

return 0;
}
int func()
{
static int l = 2;
l += s;
s++;
return l;
}

运行结果为:





答案:
第1空:s=7, a=13 || s=7,a=13 ||