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.









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. (adsbygoogle = window.adsbygoogle || []).push({}); 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
pdf file is having the 0 KB when generate the pdf file from jsp - JSP-Servlet
pdf file is having the 0 KB when generate the pdf file from jsp  Hi Friend, I am getting OKB pdf file .if i inserting the image into pdf file , i am getting the OKB pdf file now and also not able to open the pdf
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
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
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
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
return code - Java Beginners
return code  import java.util.Scanner; public class...(System.in); int menu = 0; System.out.println("School Registration System Main...: "); String name = scan.next(); break;//What code to use to return to main menu after
ModuleNotFoundError: No module named 'exit-codes'
ModuleNotFoundError: No module named 'exit-codes'  Hi, My Python... 'exit-codes' How to remove the ModuleNotFoundError: No module named 'exit... have to install padas library. You can install exit-codes python
ModuleNotFoundError: No module named 'pylint-exit'
ModuleNotFoundError: No module named 'pylint-exit'  Hi, My Python... 'pylint-exit' How to remove the ModuleNotFoundError: No module named 'pylint-exit' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'exit-codes'
ModuleNotFoundError: No module named 'exit-codes'  Hi, My Python... 'exit-codes' How to remove the ModuleNotFoundError: No module named 'exit... have to install padas library. You can install exit-codes python
ModuleNotFoundError: No module named 'exit-pipe'
ModuleNotFoundError: No module named 'exit-pipe'  Hi, My Python... 'exit-pipe' How to remove the ModuleNotFoundError: No module named 'exit... have to install padas library. You can install exit-pipe python with following
encapsulation vs abstraction
encapsulation vs abstraction  what is the difference between encapsulation and abstraction
oracle vs sql
oracle vs sql  what is the difference between oracle and sql
could not find the main class programm will exit - error
could not find the main class programm will exit - error  when i... main class programm will exit. class Car { String name: String Color...=""; String Color=""; int num=0; public void accept(){ name = "BMW
in string how will write the return statement..........?
in string how will write the return statement..........?  import...; public static void main(String args[]){ int i=Integer.parseInt(args[0...){ if(i!=0) { int temp=0; temp=i%2; i=i/2
compiler vs interpreter
compiler vs interpreter  "compiled program executes faster especially if the program contains loop" Why
Interface vs abstract class
Interface vs abstract class  Hai, Is there any possible to defining abstract methods in Interface
JETM vs Jprofiler
JETM vs Jprofiler  Can anyone explain the difference between Java Execution Time Measurement(JETM) and Jprofiler
ejb vs hibernate - EJB
ejb vs hibernate  1>>> If we have ejb entity bean why we need hibernate? 2>>> Is hibernate distributed
ejbSelect() vs ejbHome() - EJB
ejbSelect vs ejbHome  Hi, 1) What are the differences between ejbSelect() and ejbHome...() business methods in CMP bean? 2) In Ed Romans Mastering EJB 3rd edition, it is mentioned that ejb finder methods
Derby vs MySQL - SQL
Derby vs MySQL  Hi, I want to know what are the advantages using Derby Database over MySQL.  http://www.roseindia.net/eclipse/plugins/database/index.shtml
inheritence Vs inheritence
inheritence Vs inheritence  what are difference b/w c++ inheritence and java inheritence   Hi Friend, C++ supports Multiple Inheritance while Java does not. Thanks
java vs vb
java vs vb  history of java and advanced products as well as vb? compared with java and vb? finalize list out the table of java and vb products? viewers i want more soon
Return keyword
Return keyword  how do we use return in methods?   Java use of return keyword import java.util.*; public class ReverseString{ public...).reverse().toString(); return rev; } public static void main(String
Java Method Return Value
Java Method Return Value       Java  method Return Value return to the code when... When it  reaches a return statement throwing 

Ads