Types Of Functions In C Program Tamil


/* 4types
	1.No return without arg
	2.No return with arg
	3.Return without arg
	4.Return with arg
*/

#include<stdio.h>
#include<conio.h>
void add();		//No return without arg
void sub(int,int);      //No return With arg
int mul();		//Return without arg
float div(int,int);
void main()             //www.tutorjoes.com
{
	clrscr();
	printf("\n Addition :");
	add();
	sub(12,10);
	printf("\n Multiplication :")
	printf("\n Multiply :%d",mul());
	printf("\n Division :%d",div(4,2));
	getch();
}
void add()
{
	int a,b,c;
	clrscr();
	printf("\n Enter two Values :");
	scanf("%d%d",&a,&b);
	c=a+b;			//a+b
	printf("\n Total :%d",c);
}
void sub(int a,int b)
{
	int c;			// www.tutorjoes.com
	c=a-b;			//a-b     c=2
	printf("\n Difference :%d",c);
}
int mul()
{
	int a,b,c;
	printf("\n Enter two Values :");
	scanf("%d%d",&a,&b);
	c=a*b;			//a*b
	return (c);
}
float div(int a,int b)
{
	int c;                  // www.tutorjoes.com
	c=a/b;			//a/b
	return(c);
}

Login To Download Source Code

Leave a Comment:

Login To Comment

List Of Programs


Goto Examples

Operators

Looping

Number Conversion

Pattern Design

Arrays

Matrix Examples

Sorting Examples

String Function

Change Case

String In C

Maths Functions

User Defined Functions

Recursive Functions

Pointer

Structure

File Concept

Calender Programming