C Program to Add Two Numbers Using Function

In this program, you'll learn to add two numbers using function. A function is a block of statements that performs a specific task. Let's say you are writing a C program and you need to perform a same task in that program more than once. In such case you have two options: a) Use the same set of statements every time you want to perform the task. b) Create a function to perform that task, and just call it every time you need to perform that task.

Source Code
void add(int, int);
void main()
    int a, b;
    printf("Enter two number: ");
void add(int a, int b)
    printf("Addition of %d and %d is %d", a, b, a+b);
Enter two number: 12 68
Addition of 12 and 68 is 80

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