首页 > 编程语言 > 详细

C语言

时间:2021-03-07 08:57:46      阅读:25      评论:0      收藏:0      [点我收藏+]
今天来讲一讲,函数的引用;
#include<stdio.h>
void Move;
void Build;
void Paint;
int main()
{
Move();
Build();
Paint();
return 0;
}
void Move()
{
printf("the function is move material");
}
void Build()
{
printf("the function is building a build");
}
void Paint()
{
printf("the function is Paint cloth“);
}
在此应注意void是老版本的形式;

#include<stdio.h>
void ShowNumber(int iNumber);//函数声明
int main()
{
int iShowNumber;
printf("What Number do you want show\n");
scanf("%d",&iShowNumber);
ShowNumber(iShowNumber);
return 0;
}
void ShowNumber(int iNumber)//函数定义
{
printf("you want to show the Number is :%d\n",iNumber):
}
函数定义在函数体的底部;
当将函数定义放在首部,就可以省略函数声明;

C语言

原文:https://blog.51cto.com/15098536/2649834

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!