C Programming Tutorial - Functions



#include <stdio.h>

void printSomething(); (prototyping)

int main()
{
    printSomething();

    return 0;
}

void printSomething(){
    printf("durr I'm a function");  (anything to do should go inside of this curly bracket)
    return; 
}


#include <stdio.h>

void printSomething();

int main()
{
    printSomething();
    printSomething(); (to do it over and over again)
    printSomething();
    return 0;
}

void printSomething(){
    printf("durr I'm a function");
    return; 
}

Comments