C language -
Basically C is a programming language used to design various programs and applications. Its is the most commonly used language for the beginners. although it is considered as "hard to learn" but it is super easy to understand and attempt.
is
Basics -
The Header File - #include <stdio.h>
- '#' - It contains the special instructions about how to prepare the program for compilation.
- 'include' - It tells the compiler to execute the program.
- 'stdio.h'(standard input/output) - It tells the compiler to include std. input output commands. By simply adding this ,we can use the functions directly.
The Code -The second part of the code is the actual code which we are going to write. The first code which will run will always reside in the main function.
int main()
{
.... our code
}
The int keyword indicates that the main function will return an integer.
Various basics key values such as printf , scanf is used in this for input and output.
(also remember to put a semicolon (;) at the end of every line.)
printf is used to print the code while scanf is used to input the values.
Ending - The no. which will be returned by the function tells whether it is correct or not. If we want to say our code run successfully the we will return the no. 0. Any other number means that our code failed.
return 0;
}
0 Comments