What Is C
What Is C
Why learn C ?
One of the most popular programming language in the
world
If you know C, you will have no problem learning other
popular programming languages such as Java, Python,
C++, C#, etc.
C is very fast, compared to other programming
languages, like Java and Python
C is very versatile; it can be used in both applications and
technolgies
Syntax of C
Syntax refers to the set of rules and guidelines that
define the structure and format of a programming
language. It determines how the code should be written
in order for it to be valid and understandable by the
computer.
#include <stdio.h>
int main() {
printf("Hello World!");
return 0;
}
Note that :
1. Every C statement ends with a semicolon ;
#include <studio.h>
#include <stdio.h> tells the computer to include (or bring in)
a special file called "stdio.h". This file contains some useful
functions which are used in the program.
"stdio.h" is like a special toolbox for programmers. It has all
the tools needed to communicate with the computer when
we write programs.
So, stdio.h works like a remote control for the computer, with
different buttons (functions) that send signals to the
computer (like showing messages on the screen) based on the
instructions it holds. It helps us interact with the computer
and make things happen in our programs, just like a remote
control helps us control the TV.
The word "main" is the name of the container. It's like giving a
name to your special building block container. You can call it
"main" or any other name you like.
The parentheses "()" are like the opening and closing of the
container. They show that everything we put inside these
parentheses will be part of our special container.
Finally, the curly braces "{}" are like the walls of our
container. They enclose the instructions and keep them
together.