This program is a C program that performs the addition of two numbers using a function.
#include<stdio.h> void add(); //Function Declaration int main() { add(); //Function Calling return 0; } void add() //Function Definition { int a,b,c; printf("\nEnter The Two values:"); scanf("%d%d",&a,&b); c=a+b; printf("Addition:%d",c); }To download raw file Click Here
Enter The Two values:3 4 Addition:7
This program is about print the an example for no return value and with argument using functions.
#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
This program is about example for return type without arguments using functions.
#include<stdio.h> int add(); int main() { printf("\nAddition:%d",add()); return 0; } int add() { int a,b,c; printf("\nEnter The Two Values:"); scanf("%d%d",&a,&b); c=a+b; return c; }To download raw file Click Here
Enter The Two values:3 4 Addition:7
This program is about example for return type with arguments using functions.
#include<stdio.h> int add(int,int); int main() { int a,b; printf("\nEnter The Two Values:"); scanf("%d%d",&a,&b); printf("\nAddition:%d",add(a,b)); return 0; } int add(int a,int b) { int c; c=a+b; return 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