C 练习实例34

C语言教程评论

C 练习实例34

题目:练习函数调用。

程序分析:无。文章源自公式库网-https://www.gongshiku.com/html/202112/c-lianxishili34.html

实例

#include <stdio.h>
void hello_world(void)
{
    printf("Hello, world!\n");
}
void three_hellos(void)
{
    int counter;
    for (counter = 1; counter <= 3; counter++)
        hello_world();/*调用此函数*/
}
int main(void)
{
    three_hellos();/*调用此函数*/
}

以上实例输出结果为:文章源自公式库网-https://www.gongshiku.com/html/202112/c-lianxishili34.html

Hello, world!
Hello, world!
Hello, world!
文章源自公式库网-https://www.gongshiku.com/html/202112/c-lianxishili34.html文章源自公式库网-https://www.gongshiku.com/html/202112/c-lianxishili34.html
运营不易,
感谢支持!
weinxin
我的微信
我的微信公众号
我的微信公众号扫一扫
weinxin
我的公众号
 最后更新:2021-12-7
公式库网
  • 本文由 公式库网 发表于 2021年12月6日20:19:44
  • 转载请务必保留本文链接:https://www.gongshiku.com/html/202112/c-lianxishili34.html

发表评论