Uses a function prototype - C Function

C examples for Function:Function Definition

Description

Uses a function prototype

Demo Code

#include <stdio.h>

int imax(int, int);        /* prototype */

int main(void){
    printf("The maximum of %d and %d is %d.\n", 3, 5, imax(3,5));
    printf("The maximum of %d and %d is %d.\n", 3, 5, imax(3.0, 5.0));
    return 0;//from   w  w  w  .  j a  v  a 2 s  . co  m
}

int imax(int n, int m){
    return (n > m ? n : m);
}

Related Tutorials