`
#include<stdio.h>
main()
{
int b,c;
printf("enter c :");
scanf("%d",&c);
printf("enter b :");
scanf("%d",&b);
printf("%d", gem());
getch();
return 0;
}
int gem(int b,int c)
{
int a;
a=b+c;
return a;
}
`
`
#include<stdio.h>
main()
{
int b,c;
printf("enter c :");
scanf("%d",&c);
printf("enter b :");
scanf("%d",&b);
printf("%d", gem());
getch();
return 0;
}
int gem(int b,int c)
{
int a;
a=b+c;
return a;
}
`
what wrong in my codes im using dev c
You've defined gem to take 2 arguments, but you're calling it without any arguments.
You should also forward-declare gem
or define it before the main
function.
You don't have a prototype for gem(), you're not passing the required arguments, getch() requires conio.h to be included, and relying in implicit int for main()'s return type is poor practice give that this feature was removed in C99.
gem(b,c); in line 13
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.