In C/C++, Increment operators are used to increase the value of a variable by 1.
This operator is represented by the ++ symbol. The increment operator can either
increase the value of the variable by 1 before assigning it to the variable or can
increase the value of the variable by 1 after assigning the variable. Thus it can
be classified into two types:

Pre-Increment Operator
Post-Increment Operator

1) Pre-increment operator: A pre-increment operator is used to increment the value
of a variable before using it in an expression. In the Pre-Increment, value is first 
incremented and then used inside the expression.

Syntax:  

a = ++x;//increments at the beginning or here itself

Here, if the value of ‘x’ is 10 then the value of ‘a’ will be 11 because the value
of ‘x’ gets modified before using it in the expression.

2) Post-increment operator: A post-increment operator is used to increment the
value of the variable after executing the expression completely in which
post-increment is used. In the Post-Increment, value is first used in an expression
and then incremented. 

Syntax:  

a = x++;//increments after line

Here, suppose the value of ‘x’ is 10 then the value of variable ‘a’ will be 10
because the old value of ‘x’ is used.

------------------------------------------------------------------------------------

char a[]
Array of characters(String), you can access and change the values in the array by using the variable a.

char *a
Pointer to a char

const char *a=”ABC"
String literal, defines a with type "pointer to char" and initializes it to point to an object with type "array of char" with length 4 whose elements are initialized with a character string literal. If an attempt is made to use a to modify the contents of the array, the behavior is undefined.

char *a[]
means "an array of pointers to chars”.

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: