Quote:
Originally Posted by mayhbp
hello friends,
i am a newbie in C programming its only my 10th day. i have just reached functions.
if i write any user defined function the compiler give the following error.

function 'sumprod' must have a prototype..

until now ie with
loops and repetition control insts i had no errors.but now i am lost..
could u please guide me as to what i should do.

thanks.
well this is the source code

Code:
#include<stdio.h>
#include<conio.h>
void main()
{
	int a=10,b=20,c=30,s;
	clrscr();
	s=sumprod(a,b,c);
	printf("\n%d",s);
	getch();
}
 sumprod(int x,int y,int z)
{
	int ss;
	ss=x+y+z;
	printf("\n%d",ss);
	return(ss);
}

Last edited by shabbir; 26Jun2007 at 09:10.. Reason: Code block