The program is a simple example of a function in C programming. The program defines a function named "add" which takes two integers as input and returns their sum. The main function of the program first takes two integers as input from the user and then calls the add function passing the two integers as arguments.
The add function then performs the addition operation on the two integers and prints the result. The function "void add(int,int);" is known as function prototype or function declaration which tells the compiler about the return type of function and the number of arguments that the function takes.
#include<stdio.h> void add(int,int); int main() { int a,b; printf("\nEnter The Two Values:"); scanf("%d%d",&a,&b); add(a,b); return 0; } void add(int a,int b) { int c; c=a+b; printf("\nAddition:%d",c); }To download raw file Click Here
Enter The Two values:3 4 Addition:7
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions