Hi, I'm Golam Rabbani. Today I will discuss C program among you. First of all, what is the C programming?
Programming is a man made language that understands computers or any machine.
Now we will see how the program works and what is the rules of writing?
Programming is a man made language that understands computers or any machine.
Now we will see how the program works and what is the rules of writing?
The C program is called the mother tongue of computer. We talk like our mother tongue and keep in touch with each other.
But our language computer can not understand because computer man made machines. So he has to explain in his language.
The software that will be needed for writing a C program is CodeBlock.
Now we will learn how to write a Hello World program.
The software that will be needed for writing a C program is CodeBlock.
Now we will learn how to write a Hello World program.
#include <stdio.h>
int main()
{
printf("Hello world\n");
return 0;
}
By launching codeblock, just take a empty page. It will write all the codes as the above code.
Description:
Then run the code. To save C programming code, the format that has been made is .c
File name extension .c
File name extension .c
Description:
The # symbol used in the first line is called preprocessor.
Include = The C program has library functions that will be ready before it.
Stdio.h = stdio.h is the header file. In this header file, the C program will write all the rules of the program. These header files are always written above.
int main() = int main () means the main function will act as integer. Starting any program from the main function
printf ("Hello world \ n");
Printf is used to display on the monitor. Mentor writing must be written in double quotes. For any line end, use the semicolon.
return 0 = Return 0 means the function will not return anything.
One more thing to remember is that if a function starts with int. It must enter return 0.
One more thing to remember is that if a function starts with int. It must enter return 0.
Hopefully C program can understand what it is.
Thanks everyone
Thanks everyone
C programming | hello world program
Reviewed by Golam Rabbani
on
November 17, 2018
Rating:
No comments: