Introduction to C

 


Introduction to C

Why to learn C?

         "Nowadays, everything starts and ends with the use of computers. In order to create new applications and innovate, learning the C language has become more important. There are many advantages of using C programs. Some of them are it is easy to learn, portable. Let's start learning C with simple methods."


Key points to discuss before writing C codes

*Complier- A special program that converts high level language into low level language.
Basically, C program to machine level language

"We may get the question of: why it is required?

Our computer understands only "1s and 0s", which is called machine-level language. Our code has to be converted into a machine level language to make the computer understand. It works just like a translator


*Keywords- These are reserved words in C, whose meanings are already predefined.

For Ex-int, char, float, enum, union, struct etc.


*Data Types- It specifies the type of data that variable can store like integer, character, floating, double etc. 


*Identifiers- The names assigned to different entities such as variables, functions, array, etc. 

Ex: int a, float b, etc.

Here a and b are identifiers.


*Pre-Processor Directives- These directives are processed before compilation.



Hello, World!





As discussed earlier, the first line starts with preprocessor directives. This statement will be processed first; it includes the standard input-output header file in our program. Every program must contain one or more functions, and one of them must be the main function. Every program must start with the main function. The output statement printf will display the message. At the end, we are not returning any value; hence, the function must return zero. 


<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1208825570894522"
     crossorigin="anonymous"></script>


Comments

Popular posts from this blog

The Hidden You

What's Important in Life

STM32 Microcontroller- GPIO structure