当前位置:网站首页>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
边栏推荐
- TOPS,处理器运算能力单位、每秒钟可进行一万亿次
- 微信小程序,连续播放多段视频。合成一个视频的样子,自定义视频进度条
- C中main函数的几种写法
- Electron学习(三)之简单交互操作
- I received a letter from CTO inviting me to interview machine learning engineer
- 选择在同花顺上炒股开户可以吗?安全吗?
- MQ学习笔记
- Why does blocprovider feel similar to provider?
- Getting started with the lockust series
- BlocProvider 为什么感觉和 Provider 很相似?
猜你喜欢

杰理之、产线装配环节【篇】

MIT|256KB 内存下的设备上训练

运放-滞回(迟滞)比较器全流程实战计算

Pytest Collection (2) - mode de fonctionnement pytest

K-means based user portrait clustering model

Aidl basic use
![[live broadcast review] the first 8 live broadcasts of battle code Pioneer have come to a perfect end. Please look forward to the next one!](/img/27/4bd0de716f5cb360d54f140dc8e9c1.png)
[live broadcast review] the first 8 live broadcasts of battle code Pioneer have come to a perfect end. Please look forward to the next one!

基于LSTM模型实现新闻分类

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

Getting started with the lockust series
随机推荐
杰理之蓝牙耳机品控和生产技巧【篇】
Burpsuite simple packet capturing tutorial [easy to understand]
Go — 相关依赖对应的exe
idea中类中显示成员变量和方法
BPR(贝叶斯个性化排序)
PMP证书真的有用吗?
Four methods of JS array splicing [easy to understand]
【Opencv450】HOG+SVM 与Hog+cascade进行行人检测
从20s优化到500ms,我用了这三招
分离字符串中的字母和数字并使得字母在前数组在后
功利点没啥!
【单体】流辰信息I-BPSv3服务器推荐配置
CNN convolution neural network principle explanation + image recognition application (with source code) [easy to understand]
Internet of things RFID, etc
Kuberntes云原生实战一 高可用部署架构
matlab遍历图像、字符串数组等基本操作
BlocProvider 为什么感觉和 Provider 很相似?
【级联分类器训练参数】Training Haar Cascades
基础—io密集型计算和cpu密集型计算
手动实现function isInstanceOf(child,Parent)