当前位置:网站首页>Several ways of writing main function in C
Several ways of writing main function in C
2022-07-01 22:11:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
1、 The most standard way of writing
#include <stdio.h>
int main()
{
printf("Hello World! ");
return 0;
}
2、 hold int Switch to void
#include <stdio.h>
void main()
{
printf("Hello World! ");
return 0;
}
3、 Don't write int
#include <stdio.h>
main()
{
printf("Hello World! ");
return 0;
}
4、 Don't write return
#include <stdio.h>
int main()
{
printf("Hello World! ");
}
The above four writing methods all run successfully .
There are many reasons for not reporting errors
- C At first, language was just a norm and standard ( for example C89, C11 etc. )
- The implementation of standards needs the support and implementation of major manufacturers
- In the implementation of support, due to the interests of major manufacturers 、 Understanding and other issues , Resulting in different standards for implementation , There is a change
- Turbo C
- Visual C(VC)
- GNU C(GCC)
- That's why you can see that different books have different writing formats , Some return int, Some return void, Some even have no return value
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/147183.html Link to the original text :https://javaforall.cn
边栏推荐
- 股票手机开户哪个app好,安全性较高的
- Airserver mobile phone third-party screen projection computer software
- Wechat applet, continuously playing multiple videos. Synthesize the appearance of a video and customize the video progress bar
- Internet of things RFID, etc
- 月入1W+的自媒体达人都会用到的运营工具
- 物联网rfid等
- 杰理之烧录上层版物料需要【篇】
- PHP 读取ini或env类型配置
- 能升职加薪?PMP证书含金量浅析
- 选择在同花顺上炒股开户可以吗?安全吗?
猜你喜欢
[deep learning] use deep learning to monitor your girlfriend's wechat chat?
Flume面试题
Yan Rong looks at how to formulate a multi cloud strategy in the era of hybrid cloud
BPR(贝叶斯个性化排序)
EMC-电路保护器件-防浪涌及冲击电流用
js如何获取集合对象中某元素列表
News classification based on LSTM model
【深度学习】利用深度学习监控女朋友的微信聊天?
4. 对象映射 - Mapping.Mapstercover
从MLPerf谈起:如何引领AI加速器的下一波浪潮
随机推荐
按照功能对Boost库进行分类
杰理之烧录上层版物料需要【篇】
运放-滞回(迟滞)比较器全流程实战计算
旁路由设置的正确方式
杰理之关于长按开机检测抬起问题【篇】
What is the difference between consonants and Initials? (difference between initials and consonants)
MySQL数据库驱动(JDBC Driver)jar包下载
An operation tool used by we media professionals who earn 1w+ a month
杰理之、产线装配环节【篇】
A debugging to understand the slot mechanism of redis cluster
The difference between NiO and traditional IO
ngnix基础知识
PMP与NPDP之间的区别是什么?
Do you want to make up for the suspended examination in the first half of the year? Including ten examinations for supervision engineers, architects, etc
4. 对象映射 - Mapping.Mapstercover
Using closures to switch toggle by clicking a button
php反射型xss,反射型XSS测试及修复
收到一封CTO来信,邀约面试机器学习工程师
Kuberntes云原生实战一 高可用部署架构
【opencv】train&test HOG+SVM