Addition without using third variable
C program to add two numbers: This c language program perform the basic arithmetic operation of addition on two numbers and then prints the sum on the screen. For example if the user entered two numbers as 5, 6 then 11 (5 + 6) will be printed on the screen.
#include<stdio.h>
main()
{
int a = 1, b = 2;
/* Storing result of addition in variable a */
a = a + b;
/* Not recommended because original value of a is lost
* and you may be using it somewhere in code considering it
* as it was entered by the user.
*/
printf("Sum of a and b = %d\n", a);
return 0;
}