How to use the exit function to terminate process in C

1 Answer

0 votes
#include <stdio.h>
#include <stdlib.h>

int main() {
    printf("exit()\n");

    exit(EXIT_SUCCESS); // exit(0);
    
    printf("code that will never run");
}


 
 
 
/*
run
 
exit()
 
*/

 



answered May 1, 2021 by avibootz

Related questions

2 answers 245 views
1 answer 92 views
92 views asked Apr 8, 2022 by avibootz
1 answer 165 views
1 answer 191 views
...