Understanding return 1, return -1, and exit (1) in C Programming
Jul 28, 2024 · 3 min read · 1. return 1; Usage: This is usually used to return from the main function in a C program. Meaning: Returning 1 from main typically indicates an error or abnormal termination of the program. Example #include <stdio.h> int main() { // Some con...
Join discussion