After the removal of “noreturn” keyword, C11 standard (known as final draft) of C programming language introduce a new “_Noreturn” function specifier that specify that the function does not return to the function that it was called from. If the programmer try to return any value from that function which is declared as _Noreturn type, then compiler automatically generate run time error.
Ready to begin... After that abnormal termination of program. compiler error:[Warning] function declared 'noreturn' has a 'return' statement
Ready to begin... BYE BYE
This article is contributed by Bishal Kumar Dubey. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
- How to write your own header file in C?
- Callbacks in C
- Nested functions in C
- Why variable name does not start with numbers in C ?
- exit() vs _Exit() in C and C++
- Parameter Passing Techniques in C/C++
- Predefined Identifier __func__ in C
- Functions in C/C++
- Arrays in C/C++
- Implicit return type int in C
- What happens when a function is called before its declaration in C?
- Struct Hack
- exit(), abort() and assert()
- Static functions in C
- What is the purpose of a function prototype?