We've learned about programming languages ealier. Let's now start learning the basics of C language. Let me introduce the C language in comparison with the real language that we speak in our life. I'm taking English language as an example here

Now, answer me this question, "How did you learn English language?"



I'm still waiting for your answer



Thinking still?



Let me answer for you. You would have probably learned as I've learned

  • Learning alphabets
  • Learning words
  • Learning sentences
  • Learning parapgraphs
  • Writing/Reading a lesson
  • Writing/Reading a book

Any person who is learning any language would typically follow the above mentioned steps/stages. At the end of all the above steps, person can either read a book or write a book. Person who is writing the book called Author and person who is reading the book is called reader/subscriber. As you know reader need not have writing skills

When we learn C language, we should follow the similar steps metioned above. So, let's jump in to the basics

C Alphabets

C alphabets include A-Z, a-z, 0-9, any special character that appears on the keyboard (like ~ ! @ # & ^ * _ - + | \ etc.)

C words

A word is a combination of alphabets. C words are of 3 types

  • Constants - constants are fixed values and their value never changes. Example: 10 is a constant (it's a word as it is a combination of two alphabets 1 and 0)
  • Variables - variables are memory locations which are used to hold the constant values. Example: in the equation a = 10, a is called variable. It is holding the contant 10
  • Reserved words - reserved words are special kind of words which have a pre-defined action defined in C languages. There are totally 32 reserved words are available in C language. Example: int, float, while, for

C statements (i.e.; sentences)

A sentence is a combination of words. In C language, every statement ends with semi-colon (;).

Example: int a = 10;

C blocks (i.e.; paragraphs)

A paragraph is a combination of sentences/statements. Each paragraph in C language typically enclosed in { and }. This is called as block.

C program (i.e.; lesson)

A C program is a collection of blocks which are written specifically to solve problem.



void main()
  int a, b, c;
  a = 10;
  b = 20;
  c = a + b;
  printf("%d", c);

C project (i.e.; book)

C project is a collection of programs which are written to solve a complex probelm (or develop an enterprise application). A person who develops a C project is called programmer (like we called author). A person who uses the application called end-user (they don't need to have programming skills)