logo

Declaration vs. Definition of functions in C

#include <stdio.h> #include <stdlib.h> // Declaration // - what you need when using the function // (name + parameters and their types + return type) // Definition // - what you need when executing the program // (function's body + Declaration) void print_val(int x); int main(int argc, char* argv[]) { print_val(15); return 0; }