How to Create The Source Code That is Printed "Hello World"

In this case we want to print 'Hello World' by using the C compiler.

Let's check it out !


Step 1

Open the Dev-C++ for making the source code. and then click open and click source file.

Like this !



Step 2

After that write this code

#include <stdio.h>

int main () {

printf ("Hello World");

}

that codes mean that we will print 'Hello World"

Like this !



Step 3

After writing the code we run the codes by pressing F11.
And then the compiler will show 'Hello World'

Like this !



Step 4

if we did mistake, we have to recheck our source code.

Like this !


If we have rechecked our source code, we can run again by pressing F11





The explanation about the parts of each source codes 


   - #include <stdio.h>

We must put that codes in every our working in C. stdio stands for Standart Input Output.

   - Int main ()

Int stands for Integer. It means we use the integer for the source code. Every C program has a main() function. In general, a function is a block of code that performs one or more actions. Usually functions are invoked or called by other functions, but main() is special. When your program starts, main() is called automatically. Main(), like all functions, must state what kind of value it will return.

   - { }

All functions begin with an opening brace ({) and end with a closing brace (}). The braces for the main() function are on lines 4 and 7. Everything between the opening and closing braces is considered a part of the function.

   - Printf ("Hello World");

Printf means that we print 'Hello World', the output redirection operator is written to the screen. If you want a string of characters written, be sure to enclose them in double quotes (").

0 komentar:

Posting Komentar

Diberdayakan oleh Blogger.

Text Widget

Popular Posts

Recent Posts

Copyright © 2025/ Learn About C / C++

Template by : Urangkurai / powered by :blogger