C examples for Function:Function Definition
List function prototype before main function
#include<stdio.h> void sqr_it(int *i); /* prototype */ int main(void) { int x;/*from ww w . j a v a 2s . co m*/ x = 10; // sqr_it(x); /* type mismatch */ printf("%d", x); return 0; } void sqr_it(int *i) { *i = *i * *i; }