C Programming

C Programming

What is c programming?

C is one of the fastest programming language as it is close to low-level languages such as Assembly language.

  • C takes only significant CPU time for interpretation. That is why a lot Python libraries such as NumPy, pandas, scikit-learn, etc. are built using C.

  • C language was developed by Dennis Ritchie in 1972.

  • Windows, Linux, Mac all are mostly written in C. Linux is written 97% using C.

  • C has also been used widely while creating iOS and Android

    Flow chart

Algorithm

An algorithm is a step by step procedure to solve the given problem by accepting a set of input and producing the desired output for the given problem.

Pseudocode

pseudocode is a methord of describing the algorithm in the combination of natural language and programming language.

pseudocode is used in textbook and scientific publications to describe various algorithms.

Example:

  1. Read sum1,sum2

  2. find sum=sum1+sum2

  3. display sum

Structure of c programming

Main() function

Every C programming should have a function called main().

The main() function is divided into two parts:

a.Declaration section

b.Executable section

Subroutine section

The section is optical and consists of all the user-defined functions called in the main() function.

Tokens

  1. A token is smallest element of a c program.

  2. One or more characters are grouped in sequence to form meaningful words.These meaningful words are called tokens.

The tokens are broadlt classified as

Keywords in C are

Escape Sequences character

Console Input/Output functions

The precedence of operators

Simple program

  1. Add two number

    1. Hello world
![](https://cdn.hashnode.com/res/hashnode/image/upload/v1673279977636/12b80145-3b40-4a59-9795-4a51c19f80e3.png align="center")