Why

Sdílet
Vložit
  • čas přidán 10. 09. 2024
  • Visit log2base2.com/... to watch more visual videos like this.
    In this animated tutorial, we will learn about the need of #include, int main, return 0 statement.
    You may also like us on
    Facebook: / log2base2
    Instagram: / log2base2
    Twitter: / log2base2

Komentáře • 77

  • @lakhangaikwad3027
    @lakhangaikwad3027 Před 2 lety +5

    Thank ma'm, actually I'm finding why we return 0 in main function,now i understand..🤗

  • @denno445
    @denno445 Před 4 lety +15

    Very clear and simple. Great video

    • @Log2Base2
      @Log2Base2  Před 4 lety +1

      Thanks a lot. Happy Learning!

  • @muhammadfarooqkhan5569
    @muhammadfarooqkhan5569 Před rokem +1

    thanks, I found my answer here of using 'int' with main() instead of void after many reading c++ many years.

  • @AlmukhtarA
    @AlmukhtarA Před 3 měsíci +1

    Thanks a lot, you make very easy.

  • @unique_ruler_memes3003
    @unique_ruler_memes3003 Před 2 lety +8

    Mam, if the program returns integer value then we use int main..but my question is how can I know that the program will returns integer value..(in hello world there is no integer).

    • @Hustle_kiing
      @Hustle_kiing Před 8 měsíci

      0 means true,1 means false here,not like only integer value👍

  • @44r0n-9
    @44r0n-9 Před 3 lety +14

    Technically the OS invokes the _start wrapper function, which subsequently calls the main function.

  • @sandysquadswiper4477
    @sandysquadswiper4477 Před 4 lety +4

    Great initia enjoyed much
    Programming is not tuff as people told it sud complesory from 6th standard our country can have great programmer little champs 😍😍

    • @rodie99999
      @rodie99999 Před 3 lety +3

      Yes. And I think learning English properly should also be one of the top priorities.

  • @Python-FPV
    @Python-FPV Před 2 lety +2

    Log2base2 I have a question
    If there is some error then the program won't compile at first place. If program is syntactically and logically correct then program will run anyway. What's the point of writing return 0 then ?

    • @mohdjunaid9925
      @mohdjunaid9925 Před rokem

      yeah bro this also my question have you understand now please tell me..........

  • @abhishekm1903
    @abhishekm1903 Před 4 lety +14

    Brilliant work as always!!

  • @luisneuner8506
    @luisneuner8506 Před 4 lety +2

    sorry but i dont understand int main and void main it always says that int main is returning an integer value but i can also return something else and it says void main i returning nothing but it is i dont understand pls help

  • @ignaitog
    @ignaitog Před 8 měsíci

    this helped a lot

  • @anoygolui1057
    @anoygolui1057 Před 4 lety +2

    It was a good tutorial... It really helped me

  • @subirmahapatra6119
    @subirmahapatra6119 Před 2 lety

    Thanks mam. In this video very helpful for me.

  • @Iamfine861
    @Iamfine861 Před 2 lety

    Very informative video mam thank you very much

  • @aniketsontate8298
    @aniketsontate8298 Před 2 lety

    Thanks, this was really helpful.

  • @sandeepvishwakarma9920
    @sandeepvishwakarma9920 Před 4 lety +12

    Ma'am please make more videos on C ADVANCE PROGRAMMING

    • @Log2Base2
      @Log2Base2  Před 4 lety +2

      Hi Sandeep. You can watch the advanced C videos on our website. Visit log2base2.com/.

    • @mohdakib8448
      @mohdakib8448 Před 3 lety

      @@Log2Base2 Your fess is bit high please reduce it to 1k.

  • @sarthakroy5292
    @sarthakroy5292 Před 4 lety +2

    How void main works please tell me mam/sir

  • @fahims1603
    @fahims1603 Před rokem

    Nice Explanation!

  • @arpansubba4207
    @arpansubba4207 Před rokem

    The music in the intro is from nepali music's intro... And i dont know if they will claim their copyright??

  • @jothibabu3086
    @jothibabu3086 Před 3 lety

    Superb mam...Thank you so much

  • @psmemes8137
    @psmemes8137 Před 3 lety

    Make full theory on c
    Yours english is good 👍👍👍

  • @adityan5730
    @adityan5730 Před 3 lety +2

    Very nice explanation and crisp animations, keep up the good work.

  • @bharathkinnera
    @bharathkinnera Před 2 lety

    if prog could return non zero to os upon any error if it encounters, then why can't it send zero automatically without explicit mentioning

  • @brennanb3919
    @brennanb3919 Před 2 lety

    Thank you!!!

  • @adlakrishabhm4018
    @adlakrishabhm4018 Před 3 lety

    Thanks ma'am !!

  • @shubhambhandari4647
    @shubhambhandari4647 Před 4 lety +1

    Mam why can't we use any other integer in the return 0; statement ....I meant to say that can we use return 12; return 5; or any other integer in the place of return 0 cause 12, 5, etc. are also an integer ......Hope you can reply soon I need desperate help.

    • @rodie99999
      @rodie99999 Před 3 lety +2

      0 is the standard value returned to the computer to signify that the program has executed successfully.

    • @oogway5472
      @oogway5472 Před 2 lety

      You can.I wrote return -456 and the program executed successfully..

  • @srchzo
    @srchzo Před 3 lety

    Thank you ma'am

  • @SMASpy
    @SMASpy Před 3 měsíci

    If i buy a course can i use it lifetime for free?

  • @artabinkabir2908
    @artabinkabir2908 Před rokem

    If we use " return 1 " statement in main function and there we also have some errors while it was executing or running then it will a non-zero value. What will happen in the meantime?

    • @artabinkabir2908
      @artabinkabir2908 Před rokem

      If the program be okey then it will execute to " return 1"
      Why 1 is for problem
      and 0 is for okey ?

  • @adarshrathi4038
    @adarshrathi4038 Před 4 lety +2

    but after compile without return 0 ans is given so why use return 0

    • @Rahul-zo2rz
      @Rahul-zo2rz Před 3 lety

      same question. If the program worked, it'll automatically return 0. Why should we manually give a statement to return 0? I wish they explained that...

  • @baskarboss9397
    @baskarboss9397 Před 2 lety

    Excellent

  • @FlexyBuddies
    @FlexyBuddies Před 3 lety

    Too good

  • @true4189
    @true4189 Před 4 lety

    Thank u

  • @kishanbeladiya4649
    @kishanbeladiya4649 Před 3 lety

    Please make videos on c++ data structures. Thank you

  • @vanithac3973
    @vanithac3973 Před 3 lety

    What is the intention of we using conio. H

  • @abhishekm1903
    @abhishekm1903 Před 4 lety +2

    Hello Mam....
    I have one question....
    int main(int argc,char *argv[ ])
    What is the Role of Argument count & Argument vector??

    • @Log2Base2
      @Log2Base2  Před 4 lety +1

      Hi Abhishek,
      Like we pass an argument to any function. We can also pass arguments to the main function while running the program.
      Like below,
      ./a.out hello world
      These are taken as strings(space separated).
      In this case, the main function int main(int argc,char *argv[ ]) will receive 3 string arguments.
      So the value argc will be 3.
      And argv[0] will have "./a.out"
      argv[1] will have "hello"
      agrv[2] will have "world"
      These are known as command-line arguments in C.
      Hope you understand the role argc & argv.
      Thank you!

    • @abhishekm1903
      @abhishekm1903 Před 4 lety

      Thankyou so much Mam for such a Crystal clear explaination...

    • @Log2Base2
      @Log2Base2  Před 4 lety +1

      @@abhishekm1903 You are Welcome. Happy Learning!

    • @nirajraut9408
      @nirajraut9408 Před 4 lety

      @@Log2Base2 The "stdio.h" header file contains the function's official prototype also called as "function declaration" and not "function definition" as you said. The function definition is typically present in the "stdio.lib" folder.

    • @Log2Base2
      @Log2Base2  Před 4 lety +1

      @@nirajraut9408 Yes. That's why we have said stdio.h has the necessary information to include i/o related functions. Function definition won't present in the header file. If the statement presents anywhere in the video, kindly point out the video duration where it presents.

  • @kushalathreya9860
    @kushalathreya9860 Před 11 měsíci

    I still didn't get why return 0 should be used someone explain

  • @cstlacademy
    @cstlacademy Před 2 lety

    Super

  • @hymacreations9423
    @hymacreations9423 Před rokem

    Then what about getch()

  • @cstlacademy
    @cstlacademy Před 2 lety

    Upload remains video's for C programs

  • @NamiChobingMixedBlogYes

    How return 0 is optional.... sometimes it is not written then also the compiling works how 🤔 🧐

    • @PhucTran-ex5ut
      @PhucTran-ex5ut Před 2 lety

      If you dont explicit return statement in mại function . it will return default value 0

  • @wafawafa8122
    @wafawafa8122 Před 4 lety

    here android development course?

  • @shubhambhandari4647
    @shubhambhandari4647 Před 4 lety

    and another thing why doesn't void have a return function

    • @rodie99999
      @rodie99999 Před 3 lety

      void itself means empty. It doesn't have a return type. So no values are returned.

  • @minecraftcookie2929
    @minecraftcookie2929 Před 2 lety

    int main didnt understood

  • @thesmartaspiranttsa5845

    Speaker is a Mallu!

  • @_Nickel_MdSayfulIslam
    @_Nickel_MdSayfulIslam Před 3 lety

    Without return 0
    Programing does work.

    • @Skinsk69
      @Skinsk69 Před 3 lety +1

      Yes

    • @Skinsk69
      @Skinsk69 Před 3 lety +1

      This video is shit it doesn't explain any thing it's like just reading book and goes on

    • @_Nickel_MdSayfulIslam
      @_Nickel_MdSayfulIslam Před 3 lety

      and how to learn in programing c..
      Some tips for me.

    • @educationallearning8770
      @educationallearning8770 Před 3 lety

      @@_Nickel_MdSayfulIslam we will upload video on c so please go to our channel
      Thank you

  • @leomehta7351
    @leomehta7351 Před 3 lety

    _e_

  • @antunnitraj
    @antunnitraj Před 4 lety

    First time i heard about indian woman taking classes.

    • @kO_EC
      @kO_EC Před 3 lety

      Almost all colleges and schools in india have more female teachers in programming.

    • @antunnitraj
      @antunnitraj Před 3 lety

      @@kO_EC Interesting