Home >Backend Development >C#.Net Tutorial >What does return 0 mean in C language?

What does return 0 mean in C language?

尚
Original
2020-03-04 16:58:5154372browse

What does return 0 mean in C language?

The meaning of return 0 in c language:

Recommended: "c Language Tutorial"

1. Return value int Type of function return:

The return statement is used to end the loop or return the value of a function.

return 0: Generally used at the end of the main function, according to the general practice of program development, indicating the successful completion of this function.

2. Boolean type return:

return 0: return false;

return 1: return true;

Examples are as follows:

int main() 
{ 
int a;// 前面一些其他运行// ....// 到最后 
if (a == 100) {
 return 0; 
 } else {
  return -1;
   }
   }

For more programming-related content, please pay attention to the Introduction to Programming column on the php Chinese website!

The above is the detailed content of What does return 0 mean in C language?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn