int mul (int a, int b);

main()

{

int a, b, c;

a = 5;

b = 10;

c = mul (a,b);

printf ("multipilcation of %d and %d is %d",a,b,c);

}

int mul (int x, int y)

int p;

{

p = x*y;

return(p);

}

+4 votes

Once check this.

#include <stdio.h>

int mul (int a, int b);

main()

{

int a, b, c;

a = 5;

b = 10;

c = mul (a,b);

printf ("multipilcation of %d and %d is %d",a,b,c);

}

int mul (int x, int y)

{

int p;

p = x*y;

return(p);

}

#include <stdio.h>

int mul (int a, int b);

main()

{

int a, b, c;

a = 5;

b = 10;

c = mul (a,b);

printf ("multipilcation of %d and %d is %d",a,b,c);

}

int mul (int x, int y)

{

int p;

p = x*y;

return(p);

}

0 votes

#include<stdio.h>

int mul (int *, int *);

void main()

{

int a, b, c;

a = 5;

b = 10;

c = mul (&a,&b);

printf ("multipilcation of %d and %d is %d",a,b,c);

}

int mul (int *x, int *y)

{

int p;

p = (*x)*(*y);

return(p);

}

int mul (int *, int *);

void main()

{

int a, b, c;

a = 5;

b = 10;

c = mul (&a,&b);

printf ("multipilcation of %d and %d is %d",a,b,c);

}

int mul (int *x, int *y)

{

int p;

p = (*x)*(*y);

return(p);

}

+2 votes

Actually the program is correct but declaring local variable in function is old-style.so you may be using updated complier. so that it may show error.

+1 vote

#include<stdio.h>

int mul (int a, int b);

int main()

{

int a, b, c;

a = 5;

b = 10;

c = mul (a,b);

printf ("multipilcation of %d and %d is %d",a,b,c);

}

int mul (int x, int y)

{

int p;

p = x*y;

return(p);

}

int mul (int a, int b);

int main()

{

int a, b, c;

a = 5;

b = 10;

c = mul (a,b);

printf ("multipilcation of %d and %d is %d",a,b,c);

}

int mul (int x, int y)

{

int p;

p = x*y;

return(p);

}

+1 vote

Use the same argument names while defining the function.

Use int mul (int a, int b) instead of int mul (int x, int y)

0 votes

#include <stdio.h>

int mul (int a , int b );

main()

{

int a, b, c;

a = 5;

b = 10;

c = mul (a,b);

printf ("multipilcation of %d and %d is %d",a,b,c);

return 0;

}

int mul (int x, int y)

{

int p;

p = x*y;

return (p);

}

int mul (int a , int b );

main()

{

int a, b, c;

a = 5;

b = 10;

c = mul (a,b);

printf ("multipilcation of %d and %d is %d",a,b,c);

return 0;

}

int mul (int x, int y)

{

int p;

p = x*y;

return (p);

}

0 votes

ThatÂ´s the code properly running. Cheers

#include <stdio.h>

int mul (int a, int b);

int main()

{

int a, b, c;

a = 5;

b = 10;

c = mul (a,b);

printf ("multipilcation of %d and %d is %d",a,b,c);

}

int mul (int x, int y)

{

int p;

p = x*y;

return(p);

}

#include <stdio.h>

int mul (int a, int b);

int main()

{

int a, b, c;

a = 5;

b = 10;

c = mul (a,b);

printf ("multipilcation of %d and %d is %d",a,b,c);

}

int mul (int x, int y)

{

int p;

p = x*y;

return(p);

}

...

there is your error!