Sorry, this is basic, so I refuse to not understand it:
This gives the warning:Code:main() { int number = 5; printf("%i devided by two is %d\n", tall, devider(tall)); } double devider(int x) { return x/2; }
I don't understand this. I'm sending an in value to a function which returns a double. And the printf has %d for the returned double value.Code:test.c:7: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘double’
Still the compiler insists that %d expects an int variable?
.