Use function definition as function prototype - C Function

C examples for Function:Function Definition

Introduction

A function's definition can serve as its prototype if the definition is before its calling statement.

Demo Code

#include <stdio.h>

/* This definition will also serve as a prototype within this program. */
void f(int a, int b)
{
   printf("%d ", a % b);
}

int main(void)
{
   f(10, 3);/*from  w ww. j a v  a  2 s  .  c o  m*/

   return 0;
}

Result


Related Tutorials