Explore Courses
Liverpool Business SchoolLiverpool Business SchoolMBA by Liverpool Business School
  • 18 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityMBA (Master of Business Administration)
  • 15 Months
Popular
O.P.Jindal Global UniversityO.P.Jindal Global UniversityMaster of Business Administration (MBA)
  • 12 Months
New
Birla Institute of Management Technology Birla Institute of Management Technology Post Graduate Diploma in Management (BIMTECH)
  • 24 Months
Liverpool John Moores UniversityLiverpool John Moores UniversityMS in Data Science
  • 18 Months
Popular
IIIT BangaloreIIIT BangalorePost Graduate Programme in Data Science & AI (Executive)
  • 12 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityDBA in Emerging Technologies with concentration in Generative AI
  • 3 Years
upGradupGradData Science Bootcamp with AI
  • 6 Months
New
University of MarylandIIIT BangalorePost Graduate Certificate in Data Science & AI (Executive)
  • 8-8.5 Months
upGradupGradData Science Bootcamp with AI
  • 6 months
Popular
upGrad KnowledgeHutupGrad KnowledgeHutData Engineer Bootcamp
  • Self-Paced
upGradupGradCertificate Course in Business Analytics & Consulting in association with PwC India
  • 06 Months
OP Jindal Global UniversityOP Jindal Global UniversityMaster of Design in User Experience Design
  • 12 Months
Popular
WoolfWoolfMaster of Science in Computer Science
  • 18 Months
New
Jindal Global UniversityJindal Global UniversityMaster of Design in User Experience
  • 12 Months
New
Rushford, GenevaRushford Business SchoolDBA Doctorate in Technology (Computer Science)
  • 36 Months
IIIT BangaloreIIIT BangaloreCloud Computing and DevOps Program (Executive)
  • 8 Months
New
upGrad KnowledgeHutupGrad KnowledgeHutAWS Solutions Architect Certification
  • 32 Hours
upGradupGradFull Stack Software Development Bootcamp
  • 6 Months
Popular
upGradupGradUI/UX Bootcamp
  • 3 Months
upGradupGradCloud Computing Bootcamp
  • 7.5 Months
Golden Gate University Golden Gate University Doctor of Business Administration in Digital Leadership
  • 36 Months
New
Jindal Global UniversityJindal Global UniversityMaster of Design in User Experience
  • 12 Months
New
Golden Gate University Golden Gate University Doctor of Business Administration (DBA)
  • 36 Months
Bestseller
Ecole Supérieure de Gestion et Commerce International ParisEcole Supérieure de Gestion et Commerce International ParisDoctorate of Business Administration (DBA)
  • 36 Months
Rushford, GenevaRushford Business SchoolDoctorate of Business Administration (DBA)
  • 36 Months
KnowledgeHut upGradKnowledgeHut upGradSAFe® 6.0 Certified ScrumMaster (SSM) Training
  • Self-Paced
KnowledgeHut upGradKnowledgeHut upGradPMP® certification
  • Self-Paced
IIM KozhikodeIIM KozhikodeProfessional Certification in HR Management and Analytics
  • 6 Months
Bestseller
Duke CEDuke CEPost Graduate Certificate in Product Management
  • 4-8 Months
Bestseller
upGrad KnowledgeHutupGrad KnowledgeHutLeading SAFe® 6.0 Certification
  • 16 Hours
Popular
upGrad KnowledgeHutupGrad KnowledgeHutCertified ScrumMaster®(CSM) Training
  • 16 Hours
Bestseller
PwCupGrad CampusCertification Program in Financial Modelling & Analysis in association with PwC India
  • 4 Months
upGrad KnowledgeHutupGrad KnowledgeHutSAFe® 6.0 POPM Certification
  • 16 Hours
O.P.Jindal Global UniversityO.P.Jindal Global UniversityMaster of Science in Artificial Intelligence and Data Science
  • 12 Months
Bestseller
Liverpool John Moores University Liverpool John Moores University MS in Machine Learning & AI
  • 18 Months
Popular
Golden Gate UniversityGolden Gate UniversityDBA in Emerging Technologies with concentration in Generative AI
  • 3 Years
IIIT BangaloreIIIT BangaloreExecutive Post Graduate Programme in Machine Learning & AI
  • 13 Months
Bestseller
IIITBIIITBExecutive Program in Generative AI for Leaders
  • 4 Months
upGradupGradAdvanced Certificate Program in GenerativeAI
  • 4 Months
New
IIIT BangaloreIIIT BangalorePost Graduate Certificate in Machine Learning & Deep Learning (Executive)
  • 8 Months
Bestseller
Jindal Global UniversityJindal Global UniversityMaster of Design in User Experience
  • 12 Months
New
Liverpool Business SchoolLiverpool Business SchoolMBA with Marketing Concentration
  • 18 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityMBA with Marketing Concentration
  • 15 Months
Popular
MICAMICAAdvanced Certificate in Digital Marketing and Communication
  • 6 Months
Bestseller
MICAMICAAdvanced Certificate in Brand Communication Management
  • 5 Months
Popular
upGradupGradDigital Marketing Accelerator Program
  • 05 Months
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Corporate & Financial Law
  • 12 Months
Bestseller
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in AI and Emerging Technologies (Blended Learning Program)
  • 12 Months
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Intellectual Property & Technology Law
  • 12 Months
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Dispute Resolution
  • 12 Months
upGradupGradContract Law Certificate Program
  • Self paced
New
ESGCI, ParisESGCI, ParisDoctorate of Business Administration (DBA) from ESGCI, Paris
  • 36 Months
Golden Gate University Golden Gate University Doctor of Business Administration From Golden Gate University, San Francisco
  • 36 Months
Rushford Business SchoolRushford Business SchoolDoctor of Business Administration from Rushford Business School, Switzerland)
  • 36 Months
Edgewood CollegeEdgewood CollegeDoctorate of Business Administration from Edgewood College
  • 24 Months
Golden Gate UniversityGolden Gate UniversityDBA in Emerging Technologies with Concentration in Generative AI
  • 36 Months
Golden Gate University Golden Gate University DBA in Digital Leadership from Golden Gate University, San Francisco
  • 36 Months
Liverpool Business SchoolLiverpool Business SchoolMBA by Liverpool Business School
  • 18 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityMBA (Master of Business Administration)
  • 15 Months
Popular
O.P.Jindal Global UniversityO.P.Jindal Global UniversityMaster of Business Administration (MBA)
  • 12 Months
New
Deakin Business School and Institute of Management Technology, GhaziabadDeakin Business School and IMT, GhaziabadMBA (Master of Business Administration)
  • 12 Months
Liverpool John Moores UniversityLiverpool John Moores UniversityMS in Data Science
  • 18 Months
Bestseller
O.P.Jindal Global UniversityO.P.Jindal Global UniversityMaster of Science in Artificial Intelligence and Data Science
  • 12 Months
Bestseller
IIIT BangaloreIIIT BangalorePost Graduate Programme in Data Science (Executive)
  • 12 Months
Bestseller
O.P.Jindal Global UniversityO.P.Jindal Global UniversityO.P.Jindal Global University
  • 12 Months
WoolfWoolfMaster of Science in Computer Science
  • 18 Months
New
Liverpool John Moores University Liverpool John Moores University MS in Machine Learning & AI
  • 18 Months
Popular
Golden Gate UniversityGolden Gate UniversityDBA in Emerging Technologies with concentration in Generative AI
  • 3 Years
Rushford, GenevaRushford Business SchoolDoctorate of Business Administration (AI/ML)
  • 36 Months
Ecole Supérieure de Gestion et Commerce International ParisEcole Supérieure de Gestion et Commerce International ParisDBA Specialisation in AI & ML
  • 36 Months
Golden Gate University Golden Gate University Doctor of Business Administration (DBA)
  • 36 Months
Bestseller
Ecole Supérieure de Gestion et Commerce International ParisEcole Supérieure de Gestion et Commerce International ParisDoctorate of Business Administration (DBA)
  • 36 Months
Rushford, GenevaRushford Business SchoolDoctorate of Business Administration (DBA)
  • 36 Months
Liverpool Business SchoolLiverpool Business SchoolMBA with Marketing Concentration
  • 18 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityMBA with Marketing Concentration
  • 15 Months
Popular
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Corporate & Financial Law
  • 12 Months
Bestseller
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Intellectual Property & Technology Law
  • 12 Months
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Dispute Resolution
  • 12 Months
IIITBIIITBExecutive Program in Generative AI for Leaders
  • 4 Months
New
IIIT BangaloreIIIT BangaloreExecutive Post Graduate Programme in Machine Learning & AI
  • 13 Months
Bestseller
upGradupGradData Science Bootcamp with AI
  • 6 Months
New
upGradupGradAdvanced Certificate Program in GenerativeAI
  • 4 Months
New
KnowledgeHut upGradKnowledgeHut upGradSAFe® 6.0 Certified ScrumMaster (SSM) Training
  • Self-Paced
upGrad KnowledgeHutupGrad KnowledgeHutCertified ScrumMaster®(CSM) Training
  • 16 Hours
upGrad KnowledgeHutupGrad KnowledgeHutLeading SAFe® 6.0 Certification
  • 16 Hours
KnowledgeHut upGradKnowledgeHut upGradPMP® certification
  • Self-Paced
upGrad KnowledgeHutupGrad KnowledgeHutAWS Solutions Architect Certification
  • 32 Hours
upGrad KnowledgeHutupGrad KnowledgeHutAzure Administrator Certification (AZ-104)
  • 24 Hours
KnowledgeHut upGradKnowledgeHut upGradAWS Cloud Practioner Essentials Certification
  • 1 Week
KnowledgeHut upGradKnowledgeHut upGradAzure Data Engineering Training (DP-203)
  • 1 Week
MICAMICAAdvanced Certificate in Digital Marketing and Communication
  • 6 Months
Bestseller
MICAMICAAdvanced Certificate in Brand Communication Management
  • 5 Months
Popular
IIM KozhikodeIIM KozhikodeProfessional Certification in HR Management and Analytics
  • 6 Months
Bestseller
Duke CEDuke CEPost Graduate Certificate in Product Management
  • 4-8 Months
Bestseller
Loyola Institute of Business Administration (LIBA)Loyola Institute of Business Administration (LIBA)Executive PG Programme in Human Resource Management
  • 11 Months
Popular
Goa Institute of ManagementGoa Institute of ManagementExecutive PG Program in Healthcare Management
  • 11 Months
IMT GhaziabadIMT GhaziabadAdvanced General Management Program
  • 11 Months
Golden Gate UniversityGolden Gate UniversityProfessional Certificate in Global Business Management
  • 6-8 Months
upGradupGradContract Law Certificate Program
  • Self paced
New
IU, GermanyIU, GermanyMaster of Business Administration (90 ECTS)
  • 18 Months
Bestseller
IU, GermanyIU, GermanyMaster in International Management (120 ECTS)
  • 24 Months
Popular
IU, GermanyIU, GermanyB.Sc. Computer Science (180 ECTS)
  • 36 Months
Clark UniversityClark UniversityMaster of Business Administration
  • 23 Months
New
Golden Gate UniversityGolden Gate UniversityMaster of Business Administration
  • 20 Months
Clark University, USClark University, USMS in Project Management
  • 20 Months
New
Edgewood CollegeEdgewood CollegeMaster of Business Administration
  • 23 Months
The American Business SchoolThe American Business SchoolMBA with specialization
  • 23 Months
New
Aivancity ParisAivancity ParisMSc Artificial Intelligence Engineering
  • 24 Months
Aivancity ParisAivancity ParisMSc Data Engineering
  • 24 Months
The American Business SchoolThe American Business SchoolMBA with specialization
  • 23 Months
New
Aivancity ParisAivancity ParisMSc Artificial Intelligence Engineering
  • 24 Months
Aivancity ParisAivancity ParisMSc Data Engineering
  • 24 Months
upGradupGradData Science Bootcamp with AI
  • 6 Months
Popular
upGrad KnowledgeHutupGrad KnowledgeHutData Engineer Bootcamp
  • Self-Paced
upGradupGradFull Stack Software Development Bootcamp
  • 6 Months
Bestseller
KnowledgeHut upGradKnowledgeHut upGradBackend Development Bootcamp
  • Self-Paced
upGradupGradUI/UX Bootcamp
  • 3 Months
upGradupGradCloud Computing Bootcamp
  • 7.5 Months
PwCupGrad CampusCertification Program in Financial Modelling & Analysis in association with PwC India
  • 5 Months
upGrad KnowledgeHutupGrad KnowledgeHutSAFe® 6.0 POPM Certification
  • 16 Hours
upGradupGradDigital Marketing Accelerator Program
  • 05 Months
upGradupGradAdvanced Certificate Program in GenerativeAI
  • 4 Months
New
upGradupGradData Science Bootcamp with AI
  • 6 Months
Popular
upGradupGradFull Stack Software Development Bootcamp
  • 6 Months
Bestseller
upGradupGradUI/UX Bootcamp
  • 3 Months
PwCupGrad CampusCertification Program in Financial Modelling & Analysis in association with PwC India
  • 4 Months
upGradupGradCertificate Course in Business Analytics & Consulting in association with PwC India
  • 06 Months
upGradupGradDigital Marketing Accelerator Program
  • 05 Months

Different Types of Operators Explained with Examples

Updated on 14 November, 2022

71.65K+ views
9 min read

Learning programming languages begins with coding fundamental mathematical problems that require basic mathematical operations. This includes conditional, logical, bitwise, and arithmetic mathematical operations. This is accomplished by using operators in programming languages. Operators are fundamental tools or signs that help us perform mathematical and logical operations most only.

Programming languages are used to resolve real-time issues using technology. And operators are an integral tool required for programming or coding, irrespective of the language used.

Check out our free courses to get an edge over the competition

Every operator has its subtypes and branchings. 

In this article, we’ll look at the types of operators in C. 

What are the types of operators in C?

Broadly, there are eight types of operators in C and C++. They are: 

  1. Increment and decrement operators
  2. Bitwise operators
  3. Assignment operators
  4. Logical operators
  5. Relational operators
  6. Special operators
  7. Conditional operators
  8. Arithmetic Operators

Check out upGrad’s Java Bootcamp

Let’s understand each of these in detail:

1. Arithmetic Operators

These operators help perform primary arithmetic operations like multiplying, dividing, adding, subtracting, finding modulus, etc.

NAME

OPERATOR OPERAND

OPERATION

Addition

+ x,y

x+y; adds two numbers

Subtraction

  x,y

x-y; subtracts one number from another

Multiplication

* x,y

x*y; returns the product of two numbers

Division

/ x,y

x/y; returns the quotient when two numbers are divided

Modulus

% x,y

x%y; returns the remainder when two numbers are divided

EXAMPLE CODE:

#include <iostream>

using namespace std;

int main()

{

int k= 22, b = 4;

cout<<“Addition of “<< k << ” and ” << b << ” is ” << k + b <<endl;

cout<<“Subtraction of “<< k << ” and ” << b << ” is: ” << k – b <<endl;

cout<<“Multiplication of “<< k << ” and ” << b << ” is: ” << k * b <<endl;

cout<<“Division of “<< k << ” and ” << b << ” is: ” << k / b <<endl;

cout<<“Modulus between “<< k << ” and ” << b << ” is: ” << k % b <<endl;

cout<<“Incremented value ++k is: “<< ++k <<endl;

cout<<“Decremented value –k is: “<< –k <<endl;

return 0;

}

 

Check out upGrad’s Full Stack Development Bootcamp (JS/MERN) 

OUTPUT:

The addition of 22 and 4 is: 26

Subtraction of 22 and 4 is: 18

Multiplication of 22 and 4 is: 88

Division of 22 and 4 is: 5

Modulus between 22 and 4 is: 2

Incremented value ++k is: 23

Decremented value –k is: 22

2. Decrement and Increment Operators

These operators are useful in minimizing calculation. n=n+1 can be truncated to n++. The operators are:

  1. Increment (++)
  2. Decrement (–)

There is a significant difference in usage of the operators depending on the place of application.

  1. Pre-increment operators: if we write the ++ operator before the variable name, one is added to the operand, and after that, the result is assigned to the variable.
  2. Post-increment operators: if we write the ++ operator after the variable name, the value is first assigned to the variable, and increment by 1 occurs.

The same happens for pre-decrement and post-decrement operators.

 EXAMPLE CODE:

#include <stdio.h>

void main()

{

   int a1=7, b1=7;

printf(“\n%d %d”,a1–,–b1);

printf(“\n%d %d”,a1–,–b1);

printf(“\n%d %d”,a1–,–b1);

printf(“\n%d %d”,a1–,–b1);

printf(“\n%d %d”,a1–,–b1);

}

 

OUTPUT:

7 6

6 5

5 4

4 3

3 2

3. Assignment Operators

We use these operators to assign specific values to variables.

OPERATOR

NAME USE

=

Assignment

Assigns value from right to left operand

+=

Addition assignment

Stores summed value in the left operand

-=

Subtraction assignment Stores subtracted value in the left operand

*=

Multiplication assignment Stores multiplied value in the left operand

/=

Division assignment

Stores quotient in the left operand

%= Modulus assignment

Stores remainder in the left operand

4. Relational Operators

Relational operators are used for comparing two values of quantities with each other. It establishes a relation between two values.

Note: In programming languages like C or C++, we use two ‘=’ (==) to check the equality, as one ‘=’ (=) sign is used as an assignment operator. We use six types of relational operators:

NAME

OPERATOR

USAGE

Equal to

== Checks whether the two operand values are equal

Not equal to

!= Checks whether the two operand variables or constants are not equal to each other

Lesser than equal to

<= Checks if one value is lesser than or equal to the other one

Greater than equal to

>=

Checks if one of the values is greater than or equal to another one
Lesser than

Checks whether one operand is lesser than the other one

Greater than

Checks whether one parent is greater than the other one

EXAMPLE CODE:

#include <iostream>

using namespace std;

int main()

{

int q = 10, w = 10, e = 20;

cout<<“For ” << q << ” == ” << w << ” the result is: ” << (q == w) << endl;

cout<<“For ” << q << ” == ” << e << ” the result is: ” << (q == e) << endl;

cout<<“For ” << q << ” != ” << e << ” the result is: ” << (q != e) << endl;

cout<<“For ” << q << ” != ” << w << ” the result is: ” << (q != w) << endl;

cout<<“For ” << q << ” > ” << w << ” the result is: ” << (q > w) << endl;

cout<<“For ” << q << ” > ” << e << ” the result is: ” << (q > e) << endl;

cout<<“For ” << q << ” < ” << w << ” the result is: ” << (q < w) << endl;

cout<<“For ” << q << ” < ” << e << ” the result is: ” << (q < e) << endl;

cout<<“For ” << q << ” >= ” << w << ” the result is: ” << (q >= w) << endl;

cout<<“For ” << q << ” >= ” << e << ” the result is: ” << (q >= e) << endl;

cout<<“For ” << q << ” <= ” << w << ” the result is: ” << (w <= w) << endl;

cout<<“For ” << q << ” <= ” << e << ” the result is: ” << (q <= e) << endl;

return 0;

} 

 

OUTPUT:

For 10==10 the result is: 1

For 10==20 the result is: 0

For 10!=20 the result is: 1

For 10!=10 the result is: 0

For 10>10 the result is: 0

For 10>20 the result is: 0

For 10<10 the result is: 0

For 10<20 the result is: 1

For 10>=10 the result is: 1

For 10>=20 the result is: 0

For 10<=10 the result is: 1

For 10<=20 the result is: 1

5. Logical Operators

We use six logical operators when we need to make decisions by testing one or more conditions. Thus, logical operators work on Boolean values. The answers returned are either true or false.

Logical operators are of 2 types:

  1. Unary operators: These work with one variable.
  2. Binary operators: These work with two variables.

Unary operators in C

Operators that work on one variable to decide on a result are known as Unary operators.

  • Operator: ! (NOT)

The NOT operator issues negation on a constant or variable – Used as (!a)

Binary operators in C

Operators that work with two variables are called binary operators. The evaluated result is based on both of them individually.

The two binary operators in c/c++ are:

  • && : (AND) logical conjunction of expressions.

It checks whether both the opponents are actual – Used as (a&&b)

  • || : (OR) logical disjunction of expressions.

It checks if either one of the operands is true or not – Used as (a||b)

EXAMPLE CODE:

#include <stdio.h>

int main()

{

int m = 10, n= 10, c = 20, answer;

printf(“Logical operator example: \n\n”);

answer = (m == n) && (c > n);

printf(“For (%d == %d) && (%d != %d), the output is: %d \n”,m,n,n,c,answer);

answer = (m == n) && (c < n) && (c>0);

printf(“For (%d == %d) && (%d <= %d), the output is: %d \n”,m,n,n,c,answer);

answer = (m == n) || (n > c);

printf(“For (%d == %d) || (%d < %d), the output is: %d \n”,m,n,c,n,answer); 

answer = (m != n) || (m <= n) || (m>c);

printf(“For (%d != %d) || (%d < %d), the output is: %d \n”,m,n,c,n,answer);

answer = !(m == n);

printf(“For !(%d == %d), the output is: %d \n”,m,n,answer);

answer = !(m!= b);

printf(“For !(%d == %d), the output is: %d \n”,m,n,answer);

return 0;

}

OUTPUT:

For (10==10) && (10!=20), the output is: 1

For (10==10) && (10<=20), the output is: 1

For (10==10) || (20<10), the output is: 1

For (10!=10) || (10!=20), the output is: 1

For !(10==10), the output is: 0

For !(10==10), the output is: 1

6. Conditional Operator

Conditional operator or ternary operator reduces the work of an if-else block 21 single statement. It is constructed for conditional expressions.

Syntax:

VariableName = (condition) ? TrueValue : FalseValue;

Example:

a= (b>c) ? (b+c) : (b-c);


upGrad’s Exclusive Software Development Webinar for you –

SAAS Business – What is So Different?

7. Bitwise Operators

Bitwise operators perform based on Boolean algebra. These operators boost the efficiency of a program exponentially by increasing the processing speed of programs. 

  • Bitwise AND: converts the two operands into binary and performs conjunctive operation bit by bit.
  • Bitwise OR: converts the two operands into binary and performs disjunctive operation bit by bit.
  • Bitwise LEFT SHIFT:
  • Bitwise RIGHT SHIFT:
  • Bitwise XOR: converts both operands into binary and performs xor operation bit by bit
  • Bitwise ONE’S COMPLEMENT: returns the complementary form of the operand.

Bitwise operators do not work for float or double data types in C.

8. Special Operators

C/C++ facilitates the usage of some special operators, which helps in reducing the hassle of programmers. Some of them are:

  • *(Pointer)= it stores the memory address of a variable.
  • &(Pointer)= this points to the memory location where the computer stores the operand.
  • sizeof= this operator returns the space occupied by a particular data type in its memory location.

Conclusion

Operators and their functioning form the fundamentals of any programming language. To write complex code for running different apps or software, one must have a crystal-clear understanding of operators. Thus, having an in-depth understanding of their usage is crucial for aspirants who wish to excel at coding.

Suppose you are looking to master C and develop applications like Swiggy, IMDB, etc.. In that case, upGrad’s 13-month Executive PG Programme in Software Development – Specialisation in Full Stack Development can kickstart your learning journey. Offered by IIIT Bangalore, the course includes nine projects and assignments and a coveted software career transition boot camp for non-tech and new coders. In addition to the comprehensive syllabus taught by world-class faculties, the program also includes upGrad’s 360° Career Support, where students are exposed to preparation material, mock interviews, and job fairs to increase their chances of recruitment.

Reach out to us today to get started! 

Learn Software Development Courses online from the World’s top Universities. Earn Executive PG Programs, Advanced Certificate Programs or Masters Programs to fast-track your career.

Frequently Asked Questions (FAQs)

1. What is the difference between ‘=’ and ‘==’ operators?

In programming languages like C or C++, we use '==' to check the equality, whereas '=' sign is used as an assignment operator. ‘A=5+2;’ means assigning 7 to the variable A. On the other hand, ‘if(A==5)’ checks whether the value assigned to the variable is 5 or not.

2. How do pre-increment and post-increment operators work?

1. Pre-increment operators: Writing ++ before the variable increments the value be 1 and assigns the new valve to the variable.
2. Post-increment operators: Writing ++ after the variable assigns the value to the variable first and then increments it by 1.

3. What do the special operators do?

The special operators and their uses are:
1. *: To store memory location
2. &: To return memory location.
3. sizeof: To return the space occupied by a particular data type in its memory location.

RELATED PROGRAMS