© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
S. DmitrovićModern C for Absolute Beginnershttps://doi.org/10.1007/979-8-8688-0224-9_2

2. Our First Program

Slobodan Dmitrović1  
(1)
Belgrade, Serbia
 

This chapter describes the main program entry point, how to work with comments, and how to write a simple “Hello World” program.

2.1 Function main( )

Every C program that produces an executable file must have a starting point. This starting point is the function main(). The function main is the function that gets called when we start our executable file. It is the program’s main entry point. The signature of the function main is:
int main(void) {}

The function main is of type int, which stands for integer, followed ...

Get Modern C for Absolute Beginners: A Friendly Introduction to the C Programming Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.