What is the difference between return 0 and return 1?

In some programs we see return 0 while in others return 1 is used.What is the difference between the two?

  • Nisha
  • 18 सितम्बर
  • 24194 दृश्य
  • 8 उत्तर
Your Answer

The values 1 and 0 are of type int and are not implicitly convertible to boolean . So when you return 1, you are basically returning True as the final value of the function while return 0 is basically returning False as the final value of the function.

0
c programming
मॉक परीक्षण अभ्यास के लिए
c programming