C Program to Add Two Numbers Without Using Third Variable

C Program to add two numbers without using third variable for beginners. In this program, we are going to execute add two numbers without using a third variable like c to store the addition value of a and b.

Variables in C Program

A variable is nothing more than a name for a storage area that our programmes can access. 

Each variable in C has a type that determines the memory size and layout, the range of values that can be stored within that memory, and the set of operations that can be applied to the variable.

Assignment Operator in C

In the C programming language, there are various types of operators, such as arithmetic, relational, bitwise, assignment, and so on. 

To assign a value, variable, or function to another variable, use the assignment operator. 

After the assignment, the assignment operators return the value of the object specified by the left operand. 

The left operand’s type is the resultant type. An l-value is always the result of an assignment expression. 

Right-to-left associativity exists for these operators.

int main()
int a = 5, b = 5;
a = a + b;
printf("Sum of a and b = %d\n", a);


Sum of a and b = 10