ok so now I'm getting warnings and sin returns a correct result but I don't understand what is happening. how does it know how to link the functions printf , isdigit and sin?
this is the output I got:
Code:
>>gcc -Wall -pedantic testIsDigit.c
testIsDigit.c: In function `main':
testIsDigit.c:5: warning: implicit declaration of function `printf'
testIsDigit.c:5: warning: implicit declaration of function `isdigit'
testIsDigit.c:6: warning: implicit declaration of function `sin'
>>a
isdigit('c') = 0, isdigit('1') = 4
sin(x) = 0.479426
with this code:
Code:
int main ()
{
printf("isdigit('c') = %d, isdigit('1') = %d\n", isdigit('c'),isdigit('1'));
printf("sin(x) = %f\n", sin(0.5));
return 0;
}