鱼蛋代码 发表于 2016-12-2 17:59:07

简单例子分享003:ANSI函数原型声明

#include <stdio.h>
#include <stdlib.h>
void pound (int n);//ASCII函数原型声明
int main (void)
{
        int times = 5;
        char ch = '!';//ASCII码是33
        float f = 6.0f;
        pound (times);
        pound (ch);
        pound (f);
        system ("pause");
        return 0;
}
void pound (int n)//ANSI风格函数头
{                           //表明该函数接受一个int类型的参数
        while (n-- > 0)
                printf("#");
        printf("\n");
}

15701168680 发表于 2017-1-4 16:55:13

ansi是什么意思.
页: [1]
查看完整版本: 简单例子分享003:ANSI函数原型声明