Hello,world! Part 1
Hello World!
As when learning any new language, the place to start is with the classic "Hello World!" program:
Let's break down the code to understand each line:
#include <stdio.h> The function used for generating output is defined in stdio.h. In order to use the printf function, we need to first include the required file, also called a header file.
int main() The main() function is the entry point to a program. Curly brackets { } indicate the beginning and end of a function (also called a code block). The statements inside the brackets determine what the function does when executed.
Tap Try It Yourself to play around with the code.
Comments
Post a Comment