C arguments 📧

Поділитися
Вставка
  • Опубліковано 7 вер 2024
  • C arguments parameters tutorial example explained
    #C #arguments #parameters
    void birthday(char x[], int y)
    {
    printf("
    Happy birthday dear %s!", x);
    printf("
    You are %d years old!", y);
    }
    int main()
    {
    char name[] = "Bro";
    int age = 21;
    birthday(name, age);
    return 0;
    }

КОМЕНТАРІ • 33

  • @BroCodez
    @BroCodez  3 роки тому +16

    #include
    void birthday(char x[], int y)
    {
    printf("
    Happy birthday dear %s!", x);
    printf("
    You are %d years old!", y);
    }
    int main()
    {
    char name[] = "Bro";
    int age = 21;
    birthday(name, age);
    return 0;
    }

  • @Sasha-xg6xy
    @Sasha-xg6xy 2 роки тому +29

    I watched tens of other videos of famous bloggers and took Harvard cs50 course and could not figure out what argument in function was. This videos made my day and finally I'm one step closer in C. Thanks Bro!:)

    • @sumnerbrent
      @sumnerbrent Рік тому +3

      Dude, absolutley! I've been running over CS50 lecture 1 over and over to get this bit. But now finally here is what I needed! Thank you!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    • @codypreston5274
      @codypreston5274 Рік тому +2

      @@sumnerbrent yeah unfortunately cs50 doesn't explain a lot of things well, you basically HAVE to turn to other resources to piece it all together. this channel is the best I've found and not making things even more complex, but rather simple and easy to understand. where's the donate button? lol

    • @minuctruong7477
      @minuctruong7477 7 місяців тому +1

      I don't take that course but I am reading the book Programming & Design Logic. That's a great book however for a person who is slow like me, this video, this youtube channel is very helpful

  • @codypreston5274
    @codypreston5274 Рік тому +5

    BRO your videos are amazing! Yours is the first channel I've found that actually explains programming well. Every other channel seems to explain things as if the viewer already understands them, if that makes sense. when watching your video, I didn't have to google 30 different words to make sense of it all, you explained it as clearly as possible without me having to know every programming term under the sun. thank you!!!!!!!!!!!!

  • @esimeemoemmanuel8943
    @esimeemoemmanuel8943 2 роки тому +8

    This is the best explanation I've ever seen of arguments and functions(I'm new to C).
    Well explained, especially with the analogy you gave
    thanks a lot

  • @krlo5574
    @krlo5574 6 місяців тому +1

    I'm torn between feeling dumb or disappointed on my instructor😅, didn't know it was that easy to understand. Keep up the great job good Sir 👍

  • @clinton6087
    @clinton6087 10 місяців тому +2

    Thank you for doing this. It's down to earth and easy to understand. I'm taking a c# master class and sometimes get lost in the jargon

  • @Omsingh-pc5db
    @Omsingh-pc5db 3 місяці тому

    if someone is wondering, using fgets after using a scanf somewhere in your code, creates an issue and you won't be able to get a string input. so you can add a '
    ' after the identifier like for e.g.:
    scanf("%d
    ", age);
    this also creates other issues so i'd recommend using fgets before scanf always.
    this is one of the issues of writing code in older languages like C.

  • @damonmlinaric9254
    @damonmlinaric9254 13 днів тому

    man thanks so much i think im finally starting to understand arguments a little now and can continue with my course

  • @provokator-provocateur7603
    @provokator-provocateur7603 3 роки тому +5

    Go bro! This is awesome!

  • @kwadwoomariboateng9522
    @kwadwoomariboateng9522 Рік тому +1

    Wow. This is the simplest explanation I have ever come across

  • @Aguacaton-Volador
    @Aguacaton-Volador 6 місяців тому

    Thanks for your videos.. With this one of the whole series, is the first time that I feel dumb... I hope that the next one bring me some lights!

  • @bower19942
    @bower19942 2 роки тому +4

    May I suggest that you open a members subscription for your channel? I think you deserve to get some love/support from the community, your work is amazing and everything is free... being a member would only help you but it wouldn't be a barrier for the content.

  • @reemasul4313
    @reemasul4313 Рік тому

    برو انت الافضل على مدى السنين

  • @Ikarus_Riding
    @Ikarus_Riding Рік тому +4

    So easy explained on youtube yet at university the Einsteins fail to explain baisc stuff...

    • @codypreston5274
      @codypreston5274 Рік тому +5

      that's because they understand it so well, they cant even imagine how little we understand it in the beginning. ive noticed it a lot, they teach like you already know 50% when in reality most students learning programming for the first time know 1%

    • @JeersNX
      @JeersNX Рік тому +2

      It's cuz we think(we means the people who are smarter on the topic), that everybody understands it as well as we.... Some people can shorten that.

  • @solveigs77
    @solveigs77 6 місяців тому

    Perfect! Many Thanx!!! 🎉

  • @tshreektsk2376
    @tshreektsk2376 Рік тому

    really helpful, thanks a lot

  • @brunomartel4639
    @brunomartel4639 Рік тому

    hey, in my course we always do this by calling the functions in the main function, why does it work to pass arguments like these,without a main?

  • @user-ace96plays
    @user-ace96plays 2 місяці тому +1

    DONE❤

  • @macimacraft
    @macimacraft 2 роки тому +1

    so how would you pass a value into main?

  • @mccauleybacalla2228
    @mccauleybacalla2228 Місяць тому

    damn this is good

  • @jaibadani9505
    @jaibadani9505 2 роки тому +1

    NICE VID

  • @MerryMerry632
    @MerryMerry632 9 місяців тому

    thanks bro :)

  • @akhilbaburaj2348
    @akhilbaburaj2348 Рік тому

    Sir Im getting an error
    It gives the following msg in VSCode:
    The ampersand (&) character is not allowed. The & operator is reserved for future
    use; wrap an ampersand in double quotation marks ("&") to pass it as part of a
    string.
    At line:1 char:98
    + ... Files\" ; if ($?) { gcc Arguments&Parameters.c -o Arguments&Paramete ...
    + ~
    The ampersand (&) character is not allowed. The & operator is reserved for future
    use; wrap an ampersand in double quotation marks ("&") to pass it as part of a
    string.
    At line:1 char:135
    + ... rameters.c -o Arguments&Parameters } ; if ($?) { .\Arguments&Paramete ...
    + ~
    The ampersand (&) character is not allowed. The & operator is reserved for future
    use; wrap an ampersand in double quotation marks ("&") to pass it as part of a
    string.
    + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordExcept
    ion
    + FullyQualifiedErrorId : AmpersandNotAllowed
    Pls Help

  • @fmyrico
    @fmyrico Рік тому

    ay uhh whats going on people 😎

  • @Mad-Ramx_Dev
    @Mad-Ramx_Dev 5 місяців тому

    dudes

  • @li-lunarink
    @li-lunarink 4 місяці тому

    bro code with neovim