当前位置:网站首页>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
边栏推荐
- Getting started with the lockust series
- 基于YOLOv5的口罩佩戴检测方法
- js数组拼接的四种方法[通俗易懂]
- 收到一封CTO来信,邀约面试机器学习工程师
- PHP 读取ini或env类型配置
- 九章云极DataCanvas公司蝉联中国机器学习平台市场TOP 3
- [monomer] recommended configuration of streaming information i-bpsv3 server
- What is the difference between consonants and Initials? (difference between initials and consonants)
- 【级联分类器训练参数】Training Haar Cascades
- Simple interactive operation of electron learning (III)
猜你喜欢
Getting started with the lockust series
[NOIP2013]积木大赛 [NOIP2018]道路铺设 贪心/差分
BPR(贝叶斯个性化排序)
基于YOLOv5的口罩佩戴检测方法
ngnix基础知识
Go — 相关依赖对应的exe
I received a letter from CTO inviting me to interview machine learning engineer
杰理之、产线装配环节【篇】
Manually implement function isinstanceof (child, parent)
MySQL系列之事务日志Redo log学习笔记
随机推荐
What is the difference between consonants and Initials? (difference between initials and consonants)
辅音和声母的区别?(声母与辅音的区别)
二叉树的基本操作
Flume面试题
十三届蓝桥杯B组国赛
String类型转换BigDecimal、Date类型
MIT|256KB 内存下的设备上训练
杰理之蓝牙耳机品控和生产技巧【篇】
杰理之关于长按开机检测抬起问题【篇】
上半年暂停考试要补考?包含监理工程师、建筑师等十项考试
Fundamentals - IO intensive computing and CPU intensive computing
"The silk road is in its youth and looks at Fujian" is in the hot collection of works in the Fujian foreign youth short video competition
【智能QbD风险评估工具】上海道宁为您带来LeanQbD介绍、试用、教程
MySQL数据库驱动(JDBC Driver)jar包下载
LIS (longest ascending subsequence) problem that can be understood [easy to understand]
Significance and measures of security encryption of industrial control equipment
An operation tool used by we media professionals who earn 1w+ a month
物联网rfid等
【Opencv450】HOG+SVM 与Hog+cascade进行行人检测
AirServer2022最新版功能介绍及下载