Advertisement
thenewboston

C Programming Tutorial - 54 - Functions

Aug 23rd, 2014
434
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.49 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. //prototype
  5. void printSomething();
  6.  
  7. int main()
  8. {
  9.     //when you are writing big programs, you should break it up into function
  10.     //each functions does a specific task
  11.     //lets you reuse a bit of code over and over any time you want
  12.     //main is the first function that your computer always calls
  13.     printSomething();
  14.  
  15.     return 0;
  16. }
  17.  
  18. void printSomething(){
  19.     printf("I love functions");
  20.     //function is complete
  21.     return;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement