Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

C Programming Tutorial - 11 - Into to Functions

Loading...

Sign in or sign up now!
75,441
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Mar 7, 2009

All of this code is FREE on my website http://thenewboston.com

Category:

Howto & Style

Tags:

License:

Standard YouTube License

Link to this comment:

Share to:

Top Comments

  • Great tutorials. One thing though, you didn't explain the purpose of "return 0;".

  • This tutorial is approximately 12 times easier than those I have in school :D

    Thanks!

see all

All Comments (186)

Sign In or Sign Up now to post a comment!
  • im gunna bild skynet w deez twotorials

  • haha i messed up a bit im usally smarter than that but i wasnt looking where i was going anyways i put the money sign $ instead of the percent sign % on 2 of them and after trying to run it it would only let me run a number but then it would pull up random numbers after a few seconds of looking through all of the numbers and systems i found out what the mistake was and replaced it with the right symbol and fa la la la it was running smoothly :D THANKS FOR TEACHING US BUCKY!!!

  • ive noticed that about 1-2 mins into ur videos u always cough once and mention u got whooping cough :D

  • @bondservant4Him prototypes are necessary when you want to use a function before you define it. This is also necessary when you split functions into headers and actual .c implementation files. (<- really helpful to do that)

  • @Magik360 thats weird It shouldnt lol

  • How come when I leave out the: "int findarea(int x, int y);" part to the top it still works?

    Is the prototype necessary?

  • @RetroCopS int main(void) just means that main takes no arguments, where as int main() is not wrong however it has an unknown number of arguments

  • @bondservant4Him Thanks but what is the void inclosed in braces or whatever ()'s called :P

  • @RetroCopS int main (void) is the correct way actually, VOID main is the wrong one

  • I tried...

    int main (void) { int x; int y; printf("What are the lengths of the sides? \n"); scanf("%d%d", &x, &y);  printf("The rectangular area is %d square units. ", findarea(x, y)); return 0;

    }

    ... and it worked perfectly. Is there a particular reason for defining int one; instead of int x; ?

View all Comments »
Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more