Search
 
SCRIPT & CODE EXAMPLE
 

C

why do we need return 0 in c?

The return value is the exit code of your program, the shell (or any other 
application that ran it) can read and use it.
The 0 exit code is a widely accepted convention for 'OK the program execution 
was successfull'. And for non-zero numbers, it conventionally means the 
program didn't execute successfully or there is an error.
Comment

why there is return 0 used in c

The return value of main() becomes the exit status of the process.
Traditionally, an exit status of zero usually means “OK,” 
while any non-zero value indicates some kind of error. 
This is analogous with how many system calls likewise return zero 
or an error code.
Comment

PREVIOUS NEXT
Code Example
C :: right side of div 
C :: typedef pointer 
C :: fractional knapsack problem in c 
C :: c print char 
C :: turn a char into an int in c 
C :: Array Input/Output in C 
C :: strong number in c 
C :: initialize array in c with 0 
C :: merge sort for strings in c 
C :: C Program to Find Largest and Smallest Number among N 
C :: c style string 
C :: format specifiers in c 
C :: malloc c include 
C :: c read file content 
C :: how i send custom data in model field rest_framework serializer 
C :: form controls in bootsrap 
C :: c in to str 
C :: c programming 
C :: string array in c 
C :: c program for swapping of two numbers 
C :: eliminare file in c 
C :: c strcmp 
C :: print 100 times c 
C :: snprintf c 
C :: find sum of all odd numbers from 1 to n using for loop 
C :: how to read and write to fiel n c 
C :: two way communication between child and parent processes in C using pipes 
C :: count number of items using delimiter 
C :: semicolong after for() loop stackoverflow 
C :: reset c array to zero 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =