I am new in C and I have problem with compiling this code.
#include <stdio.h>
void suma( int a, int b, int wynik)
{
wynik=0;
printf("a=\n");
scanf("%d",&a);
printf("b=\n");
scanf("%d",&b);
wynik=a+b;
printf("wynik = %d",&wynik);
}
int main()
{
suma(int a, int b, int wynik);
}
I don’t know why but compiler tells me that 2 argument has type int * insted of int. I dont’ know what does it mean and where I made mistake.
Change
to
Otherwise you’ll be printing the address of
wynikas an integer.Also the way you call
sumamakes no sense.