To return the exp. or const
to the main fumction.
since, the word 'void' in C programming language means that it does not return any value to the user or calling function....this is usually used to specify a type of function...... for this reason w use 'void'in c program..
Well, it depends on what you mean by the type of a function. There are user defined functions and library functions.
statement should not return a value but function returns a value
void simply means you don't have anything to return w/in a function, it is the same as return 0; public void sample() { MessageBox.Show("This Function do not return anything"); }
convertFtoC = function(F) {return (5/9)*(F-32) }convertCtoF = function(C) {return (9/5)*C + 32; }
since, the word 'void' in C programming language means that it does not return any value to the user or calling function....this is usually used to specify a type of function...... for this reason w use 'void'in c program..
Well, it depends on what you mean by the type of a function. There are user defined functions and library functions.
In C-programming: int main (void) { return 0; }
statement should not return a value but function returns a value
There are no commands in C-programming, you should use function sqrt from math.h
In C/C++ programming and most other procedural languages, you use a return statement to return control to the calling function. In the case of the global main function, a returnstatement terminates the program, releasing all memory used by the program and returning control to the execution environment.Functions that return void do not return a value and therefore do not require a return statement, unless the function needs to return early (before falling off the end of the function). Functions that return values must use a returnstatement to return the appropriate value to the caller.In C++ (but not in C), the global main function does not require a return statement unless returning early. When omitted, the global main function implicitly returns the value 0 (to the execution environment) when execution falls off the end of the function. To return any other value, a return statement is required.
Where there is no need to return any type of value from a function
void simply means you don't have anything to return w/in a function, it is the same as return 0; public void sample() { MessageBox.Show("This Function do not return anything"); }
convertFtoC = function(F) {return (5/9)*(F-32) }convertCtoF = function(C) {return (9/5)*C + 32; }
To return the exp. or const to the main fumction.
To specify the return-type of the function.
Not all host environments make use of a C program's return value, thus some implementations still allow the void main function signature. C++ does not permit it, however. All C++ programs must return an integer whether the environment uses it or not.