return 0 vs exit 0

return 0 vs exit 0

what is the difference between return 0 and exit 0 in c? i could not find any difference in their behaviour (both terminates the process execution) in a program.

View Answers

June 12, 2012 at 3:20 PM

Difference between return and exit in C

A return is an instruction of the language that returns from a function call while exit is a system call (not a language statement) that terminates the current process.


June 13, 2012 at 11:35 PM

hi deepak,

thanks for your quick response.

let it be system call or language instruction.is there any difference between their behaviour in a program.because both are used to terminate a program.please restrict the answer to return 0 and exit(0).thanks in advance.

Ads









Related Tutorials/Questions & Answers:
return 0 vs exit 0
return 0 vs exit 0  what is the difference between return 0 and exit 0 in c? i could not find any difference in their behaviour (both terminates the process execution) in a program
ArrayIndexOutOfBoundsException: 0
ArrayIndexOutOfBoundsException: 0  I'am a newbie to java, i have..." java.lang.ArrayIndexOutOfBoundsException: 0 at jpcap.Jpcap.(Jpcap.java:34) at jpcap.Jpcap.main(Jpcap.java:155) Java Result: 1 BUILD SUCCESSFUL (total time: 0 seconds) here is my code
Advertisements
retrun 0 to os
retrun 0 to os  why should the os needs to be notified of the completion of the program using return 0? what will the os do when it receives a call from return 0 in c
link border 0 css
link border 0 css  Hi, What will the css for making links border 0 in image? I am looking for example code for link border 0 css. Thanks
Combobox jsp from 0 to 10
Combobox jsp from 0 to 10  Hi guys please help me to write a very easy program using jsp to display value in combobox from 0 to 10. How to write...;% for(int i=0;i<=10;i++){ %> <option value="<%=i%>"><%=i%><
hibernate 5.3 0 maven dependency
hibernate 5.3 0 maven dependency  Hi, What is dependency of hibernate 5.3 0 which i can add to pom.xml file? Thanks   Hi, Add the following maven dependency in your pom.xml file of your project: <dependency>
data science jobs with 0 experience
data science jobs with 0 experience  Hi, I am beginner in Data...: data science jobs with 0 experience Try to provide me good examples or tutorials links so that I can learn the topic "data science jobs with 0
Python create array of size n with value 0
Python create array of size n with value 0  Hi, In python I want to create an array with n size and initialize it with 0 value. What is Python code to create array of size n with value 0? Thanks   Hi
what is the difference between productList==null and productList.size()==0
what is the difference between productList==null and productList.size()==0  what is the difference between productList==null and productList.size()==0? here productList is of type LIST
com google code gson gson 2.8 0
com google code gson gson 2.8 0  Hi, I want to use the class com google code gson gson version 2.8 0. What is maven dependency for com google code gson gson 2.8 0? Thanks
LOGIN FAILED", $_SESSION['login fail']='0',}?>
LOGIN FAILED", $_SESSION['login fail']='0',}?>  please correct my error guys
com google code gson gson 2.8 0
com google code gson gson 2.8 0  Hi, I want to use the class com google code gson gson version 2.8 0. What is maven dependency for com google code gson gson 2.8 0? Thanks   Hi, Add following maven dependency in your
JAVA leftshift operator add 1 instead of 0
JAVA leftshift operator add 1 instead of 0  Hi Guys, I have a task... on that, it adds "0" on left side of value. For example, view plaincopy... So, the answer will be 20. But, I want to have "1" instead of "0"s. So
count occourance no of time no between 0 to 9 given by user in java
count occourance no of time no between 0 to 9 given by user in java  ...]; int i,temp=0; DataInputStream dis=new DataInputStream(System.in); for(i=0;i<9;i
Replication factor: 1 larger than available brokers: 0
Replication factor: 1 larger than available brokers: 0  Hi, I am...: 1 larger than available brokers: 0. [2017-12-09 14:25:42,460] ERROR... larger than available brokers: 0. (kafka.admin.TopicCommand$) How to solve
error:Parameter index out of range (1 > number of parameters, which is 0).
error:Parameter index out of range (1 > number of parameters, which is 0).  my code:String org=request.getParameter("Org"); String desg=request.getParameter("des"); String From=request.getParameter("From"); String
applicationDidEnterBackground Exit
. */ exit(0); return; } Thanks...applicationDidEnterBackground Exit  Hi, Provide me full code of applicationDidEnterBackground exit(0). Thanks   Hi, Here is the complete
for what value of i the loop executes for infinite times if i prove a condition like ( i !=i+0)
for what value of i the loop executes for infinite times if i prove a condition like ( i !=i+0)  for what value of i the loop executes for infinite times if i prove a condition like ( i !=i+0
if i run this prog, i got exeption in thread "main" java.lang.ArrayIndexOutOfBoundsException:0 at Maxof2.main(Maxof2.java:9), whats the resolution for ths?
" java.lang.ArrayIndexOutOfBoundsException:0 at Maxof2.main(Maxof2.java:9), whats the resolution for ths... int i = Integer.parseInt(args[0]); int j = Integer.parseInt(args[1]); if(i..., ArrayIndexOutOfBoundsException:0 means that you haven't specify the arguments along
create webpage with table sql database using netbeans 6.8 with struts complete tutorial.(include username and password) 0 Answer(s)
create webpage with table sql database using netbeans 6.8 with struts complete tutorial.(include username and password) 0 Answer(s)  create webpage with table sql database using netbeans 6.8 with struts complete tutorial.(include
Can u print in turbo c 9 8 7 6 5 4 3 2 1 0 using pre increment operator Only use print ++a in the same printf() command ten times)
Can u print in turbo c 9 8 7 6 5 4 3 2 1 0 using pre increment operator Only use print ++a in the same printf() command ten times)  Can u print in turbo c 9 8 7 6 5 4 3 2 1 0 using pre increment operator Only use print
Can u print in turbo c 9 8 7 6 5 4 3 2 1 0 using pre increment operator Only use print ++a in the same printf() command ten times)
Can u print in turbo C  Can u print in turbo c 9 8 7 6 5 4 3 2 1 0 using pre increment operator Only use print ++a in the same printf() command ten times
getResourceAsStream() vs FileInputStream
getResourceAsStream() vs FileInputStream  getResourceAsStream() vs FileInputStream
charAt() method in java
() in java. This method comes in java.lang.String package. charAt() return the character at the given index within the string, index starting from 0. This method return the character at the specified index in the string. Syntax: public
ModuleNotFoundError: No module named 'exit'
ModuleNotFoundError: No module named 'exit'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'exit' How to remove the ModuleNotFoundError: No module named 'exit' error
ModuleNotFoundError: No module named 'exit'
ModuleNotFoundError: No module named 'exit'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'exit' How to remove the ModuleNotFoundError: No module named 'exit' error
how to exit gremlin console
how to exit gremlin console  Hi, I am working on gremlin and don't know how to exit from the console correctly? What is the command? Thanks   Hi, to exit from the gremlin console type following command: :exit
how to exit gremlin console
how to exit gremlin console  Hi, I am working on gremlin and don't know how to exit from the console correctly? What is the command? Thanks   Hi, to exit from the gremlin console type following command: :exit
How to eliminate error," Could not find the main class: filecopy.FileCopy. Program will exit." ?
Program will exit." ?  run: java.lang.NoClassDefFoundError: filecopy... class: filecopy.FileCopy. Program will exit. Exception in thread "main" Java Result: 1 BUILD SUCCESSFUL (total time: 0 seconds
websphere vs weblogic
websphere vs weblogic  websphere vs weblogic Why you are using websphere instead of weblogic
encapsulation vs abstraction
encapsulation vs abstraction  what is the difference between encapsulation and abstraction

Ads