C Programming - 38 - Use of Macros

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ม.ค. 2025

ความคิดเห็น •

  • @finan2249
    @finan2249 9 ปีที่แล้ว +2

    Great video. Can you tell me what the advantage of a macro over a function is and when I should use a marco?

    • @AndrewPankow
      @AndrewPankow 7 ปีที่แล้ว +4

      I may be late to this... but you would use them like "snippets" of code that you continuously call. Writing a copy/paste style replacement is just as clean as a function but substitutes run-time overhead for compile time overhead. But it's important to note that it's a copy/paste call not a function call... You're only going to be organizing what you pass to a macro not performing anything on the arguments.

    • @ElJohnny
      @ElJohnny 6 ปีที่แล้ว

      Yes!!! Thnak you for this answer! The beginig is worthless TBH but the last sentence explains it all! " You're only going to be organizing what you pass to a macro not performing anything on the arguments." which is clear now that you pointed out xD thank a lot Andrew appreciate it bro

  • @ElJohnny
    @ElJohnny 6 ปีที่แล้ว

    This is great! Great video man. I love it

  • @hasanmahmud8753
    @hasanmahmud8753 7 ปีที่แล้ว

    tHIS IS AMAZING..THANK YOU SIR.

  • @Gopal-RamaKrishna
    @Gopal-RamaKrishna 7 ปีที่แล้ว

    Thanks A Lot Sir.

  • @rohitbharti8836
    @rohitbharti8836 5 ปีที่แล้ว

    helpfull

  • @YoSK_22
    @YoSK_22 6 ปีที่แล้ว

    "if" is not a loop :)