Mega Code Archive

 
Categories / C / Code Snippets
 

Define two functions and make function call

#include <stdio.h> void f1(void), f2(void); int main(void) { f1(); return 0; } void f1(void) { int j; for(j = 0; j < 10; j++) f2(); } void f2(void) { int j; for(j = 0; j < 10; j++) printf("%d ", j); }