Learn Basic Syntax of C Programming

C Programming Basic Syntax:

We have already seen the basic Structure of C Program.So it is going to be very easy task for you.

Tokens:

A C program is consists of tokens.Token is either a keyword, an identifier , a constant, a string literal , or a symbol .
1.Keywords.
2.Identifiers
3.Constants
4.Strings
5.Special symbols
5.Operators


1.Keywords

The following words is known as keywords or reserved words.

auto else long switch
break enum register typedef
case extern return union
char float short unsigned
const for signed void
continue goto sizeof volatile
default if static while
do int struct _Packed
double

2.Identifier:

In C program An identifier is used to identify a variable, functions or a user defined items.An identifier starts with a letter A to Z, a to z, or an underscore '_' followed by zero or more letters, underscores, and digits (0 to 9) as well as you must remember C program case sensitive. So you need aware of using these stuffs.

3.Constants:

The constants ofen used in c program.We use constant as per our need.

int a,b;
a = 10; //here 10 is constant
b = 15; //here 15 is constant

4.Strings:

String is a set of caracters

printf("Hello");//here Hello is a String

5.Special symbols:

We are write lots of symbol in your codes like differnt brackets, semicolons etc that is call special symbol

int a;
a = 5; // here ; is a symbol
printf("%d",a); // here "" , and ; is symbol    

6.Operators:

We use operator for an operation;

int a;
a = 5; // here = is a assignment operator



Semicolons:

A Semicolons is called line terminator.Every individual line must terminate with Semicolons.For an example:

printf("hello") ;
return 0;

Comments:

Comments are used for helping others people who are going read or trying to understand your codes.There are two types of comments available in C Program.
1.Single Line Comments.It starts with //
2.Multiline Comments.It Starts with /* and ends with */

int b;//this is single line comments
/* this is multiline comments */

Best way of learing

Self learing is the best learing in the world. Discover yourself first then will get what you are And what you want to do .It will push you for self learing.

Why you need to learn coding?

Coding will play a vital role in one's life . It will help to open a new window of thinking . You can think better way than past . It helps to organise all the thing in better way .