Wednesday 25 March 2015

funtion: with out parameter and with return value

#include<stdio.h>
#include<conio.h>
int add();
void main()
{
int z;
clrscr();
z=add();
printf("%d",z);
getch();
}
int add()
{
int a=10,b=20;
int c;
c=a+b;
return c;
}

No comments:

Post a Comment