UMBC | CMSC 313 -- Sample Program | Previous | Next |
#include <stdio.h> int func( int a, int b, int c ); int main( void ) { int x = 1; int y = 2; int z = 3; int w; w = func( x, y, z ); printf( "%d\n", w ); return 0; } int func( int a, int b, int c ) { return a + b + c; }
#include <stdio.h> extern int func( int a, int b, int c ); int main( void ) { int x = 1; int y = 2; int z = 3; int w; w = func( x, y, z ); printf( "%d\n", w ); return 0; } /* We can simply comment out this function and for our purposes, it is gone. */ /* int func( int a, int b, int c ) { return a + b + c; } */