Uses a function prototype to
enforce strong type checking : Function « Function « C / ANSI-C
- C / ANSI-C
- Function
- Function
Uses a function prototype to
enforce strong type checking
void sqr_it(int *i); /* prototype */
int main(void)
{
int x;
x = 10;
sqr_it(x); /* type mismatch */
return 0;
}
void sqr_it(int *i)
{
*i = *i * *i;
}
Related examples in the same category