Added: 2 years ago
From: thenewboston
Views: 75,552
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
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

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

    Is the prototype necessary?

  • @Magik360 thats weird It shouldnt lol

  • @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)

  • 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; ?

  • Honestly mate you're an absolute God. Nice one

  • Very helpfull thanks a bunch

  • A very useful video for us beginners! XD

  • Grinding my way through this chapter on functions and spent the time to watch this video. Now I'm burning through the topic.

  • Awesome! its been 2 months i am banging my head into books, surfing the net, asking those who claim to know functions but none was helpful.. atleast i have something to look upon! thanks! :)

  • "In your parameters you have to GOUHOU%&^%^&%&^%&^ sorry about that"

    Lol'd At this part XD

    Thanks for the tutorial , very helpful :).

  • whats the purpose of return 0 ?

  • @redcodeful it tells your computer that it ended normally and it didn't crash when it closed. If it does crash it will tell you though, It also helps with debugging sometimes. oh and don't use int main(void) just use int main(), It is only for special computers and will screw up some more advanced stuff, the void one will. int main is how it's supposed to be.

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

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

  • @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

  • thank you very much sir, this helps me a lot, Function is the coverage of our Departmental Test this coming Oct 19 then after that sembreak :D.

  • lmao u always got whooping cough man!

  • What program do you use to compile?

  • @defiantHipHop He is using dev c++ i believe

  • K idk if he will explain this later, so I figured id just ask now. I was experimenting with functions and I tried to make a program that checks to see if you are above a certain age. I used an if else statement in the function, when I realized I didn't know how to use what the function returns in anything other than a print statement... help plz!

  • @Xenocide007 you need a return type in your function, Message me your code and ill help you out

  • into to functions lol

  • man you are the best...even the beybi can understand :))))

  • char like charizard? chAr...acter...

  • can you make the variables x and one have the same name? just call them both one or x? it seems kind of pointless making another variable.

  • @cookiesRgood26 yes you could but its best to use different names unless it is a simple program like this

  • I can never remember when a function requires the address of operator when passing a variable and when it doesn't. Here scanf requires it but the findarea doesn't.

  • @spunright the ampersand is only when you are storing something in that address or when you are passing the address.

  • Can't type and think at the same time. LOL! Your head is running on a serial...

  • Very good tutorial. Thanks.

  • how do you make this multiplication loop if someone enters a letter been trying to figure it out for like 2 weeks

  • @321boileranimal what do you mean if someone enters a letter?

  • @bondservant4Him

    @321boileranimal if I want to multiply to numbers. but the terminal operator enters a letter, I want it to send an error message that prompts the operator again, in a do while loop. How ever once I put in the conditions for letters, to cause the loop. The loop goes on and on and doesn't stop

    

  • @321boileranimal i think you will need to use some kind of if else statement with the boundaries of your user input being between 0 and 9 anything else they will have to reinput, you can send me your code if you want me to look at it im curious myself

  • @bondservant4Him I'll show you what I have, I'm in a introductin to programming with C++ class let me pull up the text

  • @321boileranimal if I want to multiply to numbers. but the terminal operator enters a letter, I want it to send an error message that prompts the operator again, in a do while loop. How ever once I put in the conditions for letters, to cause the loop. The loop goes on and on and doesn't stop

  • Do you mean "Intro"?

  • What does the "return 0"-thing in the main function do?

  • @NondrinkableCake ends the program

  • @bondservant4Him Doesn't the program end itself? Why is it needed?

  • @NondrinkableCake its needed because main is a function itself and its data type is an int thus it has to return and integer

  • @NondrinkableCake you could also use void main() and then you dont have to return anything, but its not recommended because some compilers dont handle this correctly

  • @NondrinkableCake return 0 doesn't return anything.

  • It's so clear explanation . Thanks

  • Wow that was really cool!

  • this guy ROCKSSSSSS :D thanks man because of you i regained hope in life, u were the fainting light i saw in in my dark programing lecture room, i followed the light nd i have LEARNT :D

    GOD BLESS YOU SON.

  • i only understand this because i learned C with your tutorials, then learned python with your tutorials and used it in an object oriented setting, then i came back and am learning C again and FINALLY get it lol.

    Thanks loads man.

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

    Thanks!

  • could you also have said in the function " x * y= area then return area? but if you do that does that mean you must declare area as an int in the function?>

  • in2 2 functions

  • what does conio.h means? and what is it for?

  • what it mean:

    int function_name (void);

    What does that (void) mean?

  • @kildas (void) specifies the data type for the function. It means that no data is returned to the main program, if it's integer then a whole number is returned, etc. Hope that helps! =)

  • My output is 13761456;Why ?

  • Thank you so much for this.XD My book sucks at explaining this. And, I had been stuck on functions for quite a while. And then, you made it simple, lolol.

  • can you put the definition function of findarea b4 int main?

  • Someone should make a montage of all the times he does the wooping cough.

  • great job man .so helpful..

  • there is one thing common in all yur videos..sorry i got whooping cough..:Dlol

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

  • @tapewobble

    When you are using an int before the function name, that means the function needs to return a value. He is just returning 0 to return some sort of value.

  • @tapewobble yo, it returns 0, as this is a void in the main function, so it doesnt return anything

  • @tapewobble hey dumbass, he explained it in one of his first vids. -.-'

  • @TheMedic1231 No actually he didn't . He just added it in this video. Learn to read and see. DUMBASS

  • @PH5221 he did say in one of his tutorials what the return 0; meant, i know cause i actually WATCHED his tutorials... xDDD

  • killer programmer!

  • In functions, what does "return via the function's name" means? I saw that on my exam, and I didn't really know what it meant.

  • is it possible to create a switch case function within a function?

  • great tutorials man , please i beg you , make more , i need them to study for my college :)

    you helped me a lot , you're a great teacher , keep up the good work !

  • what the hack you talking about :)

  • Also, it is to make it more clear of course, but on the 4th line it is not necessary to identify the integers x and y yet, just findarea(int, int) is OK, as long as you identify them in the function later on. Maybe this gives some people more clarity of what the computer is actually doing.

  • @Auroraa94

    Cool, so can you explain me how pointers work then?

  • @TheDgdsmaster : rofl! :D

    

  • great work ,you made it all at one go ,thank you for your video, great help

  • Comment removed

  • where is the source code??

  • I'm a very young person learning how to program. Let's say I'm not 16 yet.

  • @MiniIsaacACE fuck!! im 14 u idiot!! and i completed even c++..

  • you spelled intro wrong in the title of the video :) but this video was super helpful thanks

  • @1:34 looool.....give your name a function?

  • i didn't write int findarea(int x, int y); on 4th line and it worked.

  • Comment removed

  • I've been reading my bloody C book for hours and i didn get a thing. I just watched this video and got the whole concept in 8.07 minutes. Thanks dude, you're a life saver.

  • Great Tutorial. 

  • woo thanks man! helped me a lot!

  • {

    return x  * y;

    }

    Doesn't the "* Asterisk" also mean times x by y?

  • cant you just set findarea(one,two) to some variable like z for example so that you don't have to type that function in every time u want to use it???.

  • Comment removed

  • I have a question, for getchar(). I always put getchar() as the last line of main(). However, it seems the program tends to skip this getchar().

    So I need to put one or two extra getchar() to make the program stop to show the result.

    Is there anything I can do to without using extra getchar()??

    Thank you

  • @jimmy5420 Well sometimes all you need is the extra getchar() because sometimes the program opens and buffers the first one so you need the second one there just in case.

  • @Bansihm3nt I see, thx for the help.

  • @jimmy5420 Hey man,

    Sure. Try replacing getchar( ) with:

    system("PAUSE");

    That should do the trick.

  • @matthazan or getch();

    system() is slow and NOT recommended.

  • lol"Into to Functions"

    intro?

  • bucky dude.wat does..return 0; does????

  • @MrAbIRaZ

    return true

    which returns to the main function. I think.

    I don't think it is necessary, but what would I know watching a beginner tut.

  • thanks you very much , now i know how to use the function .

  • bucky is the man!

  • Whooping cough....the No.1 killer of programmers worldwide...

  • @whyzeguy ahaha you are a genius !!!

  • @whyzeguy Every video I hear him say that I just crack up. Haha I know it's coming, and when it finally get's there im like yes!!!!!! its like his catch phrase like bart simpsons "eat my shorts" or gary colemans "Whatchoo talking 'bout willis?"

  • @whyzeguy ya really, well said...

  • *11 Tutorials, and still got the cough..... Gutted

  • Ahh, now I understand the difference between variables and parameters ^^

    Thanks!

  • lol i heard a motor cycle in the background around 7:04 :D

  • better explanation than some of my college proffessors and in a really short time

  • there's no need for having a prototype at the top.... just place your function above main(void)

    less code = less work = less confusing = win

  • I need tutorial on pointer. Could you please do the tutorial  on pointer function. Thanks

  • It seems like every video you have the whooping cough. Hope you get well soon. lol. nice videos...really helps explain how to do these stuff.

  • Thank you!!!

  • thanks!!!

  • i have a horse named bucky lol..

  • what is the return 0; for?

  • To check if the program compiled correctly. If it didn't compile correctly, it will print a number other than 0.

  • @kkacper9

    Return -; is similiar to getch(); it just simply makes sure that the console does not close before you can see it.

  • @BufferOverflowAttack return is nothing like getch().

    return, returns out of the flow of a function. For example.

    if (condition) return our of function with this value.

  • so it can return to the begining i think?...am i right?

  • @kkacper9 It returns from the main function with a value of zero. A value zero is a default value. If it were to just return with no value, then it might return any crazy value which isnt wanted.

  • I believe return 0 is just to make sure the program ends.

  • @kkacper9 google is your BFF

  • What is the name of the website you say at 7:52?, I can´t understand what you´re saying. Thanx

    Great Tutorial by the way.

  • Dude, you are a lifesaver for me and several of my classmates in my C-Programming class. Thanks so much.

  • Good video. Very helpful. However, I noticed your compiler is very slow. You should use a program called Code Blocks. It compiles programs really fast and has colours for different things. Try it, its very good.

  • Code::Blocks is not a compiler.

  • yes i know that. What I meant was that the program "code blocks" is used for C programming. It has a built in compiler that compiles faster than the compiler in his program.

  • Functions don't "spit out data", you lunatic. Leave that poor compiler alone.

  • These videos are great! very concise! In an hour of watching and programming along I have effectively reviewed a month's worth of material for my electrical engineering test. although in order to do well on the test I will still need to do lots of practice problem solving.

  • great videos man, i've so much more from these videos than my professor :P do you base these tutorials from the C Programming book by  Brian Kernighan?

  • can anybody post his website address please

  • where on ur site is the code located

  • I have a question. why not just use #define , for example you could use:

    #define findarea(a,b) (a*b)

    and there you have a function that you can use to automatically calculate anything

  • of course you could do that more simply but the point of the tutorial is to teach someone how to make functions so that when you have more complicated tasks you can write the necessary functions.

  • Am getting compiler error.....Please can any1 help me

  • copy and paist ur code here

  • Complicated man

  • Dude, stop coughing, it is annoying as hell. Just grab Audacity or any other free audio editor to edit the audio of the video, so the cough is out of the track and then add it to the video with VirtualDub.

  • It's spelled serious.

  • uhm oh ya im from england and thats how we spell it here so if you dont spell it that way then stop using our language. simple you lowlife

  • ehm, using LMAO and seriuse as a language native to you is a huge sign of not getting laid because you are ugly or a socially awkward person.

    Go to a gym and build your body. Also go out and see the world. Talk to people in real life.

    Oh and stop spamming. The internet is already full of it. Again, you lack purpose.

  • ok well il let everyone else judge on that comment and stop speaking my language now lol

  • The Whooping Cough can best be considered as his signature trademark. I like it!

  • Not true. There is a plethora of other authors that do the same, and it is disturbing and distracting.

  • I love how people pick Youtube comments as a distress place to spam about their own psychological projections.

  • I love how people pick youtube to spit out little factoids they learned in Psych 101 (total bullshit course by the way) to sound smart.

  • Dude lower your guard, are you earning something from this whole nonsense?

  • lmao owned

    Agreed!

  • I expect programming hungry watchers, hence smarter than average people. I was wrong, so I had to Pwned them.

  • @gasto5

    loool

  • @gasto5 Sometimes, i dream about cheese.

  • Gr8 job Bucky!!! thnx alot.

  • great help!!!!!!!!!!!!!! cheers

  • have you checked for SQL Injection vulnerabilities on your admin control panel for your website?

  • hello sir bucky?? is this the last tutorial? pls upload more.. about arrays... your videos are very helpful to me.. i'm already your subscriber..

    i'll be waiting for the other c tutorials..

    thanks..

    god bless..

  • Bucky wouldn't a pointer be better for returning the answer? I've always found the return function rather unwieldy. Or global variables?

  • Global variables are discouraged practice. Going the pointer router would work, if you didnt mind losing variable scope. Really just depends on the job.

  • i think the point of the video is to illustrate how a main function calls on another function and retrieves the data. There's another video on pointers.

    So, yes - obviously there are better ways to do it, but that's not the purpose of the video.

  • Cool Video A+++++++++++++++++++++

  • This is wrong. You should have two new variables in your called function. Have them perform an algebraic expression, assign the answer to that expression to a new variable, then return that variable. The way you've done it works but will mess you up when you try to do anything really useful with your routine.

  • you're an idiot

  • mybe u

  • isnt area lenght X width?

  • Yeah area is length X width(just correcting the spelling you write lenght not length..)

  • THX please upload more before i forget!! lol

  • Very niceee

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...