C Program to Add Two Numbers

In this program, we will learn to how to add integer numbers. Here we have declared three variable num1, num2 and sum. The addition of two variables is stored in sum variable.



Source Code
#include<stdio.h>
#include<conio.h>
void main()
{
    int num1, num2, sum;
    clrscr();
    num1 = 12;
    num2 = 23;
    sum = num1 + num2;
    printf("Addition of %d and %d is %d", num1, num2, sum);
    getch();
}
Output
Addition of 12 and 23 is 35





"Coding Hub - Learn to code" app now available on Google Play Store



"Coding Hub - Learn to code" app now available on Google Play Store