To fulfill the purpose I don't use return but use a different method. pass by references:
#include<stdio.h>
void myFunc(int n[]){
int i;
for(i = 0; i<10; i++)
n[i] = i;
}
int main(void){
int a[10];
int i;
myFunc(a);
for(i=0; i<10; i++){
printf("%d\n",a[i]);
}
}
statement should not return a value but function returns a value
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..
use the _itoa function
Normally the return value from the function is through the information from the accumulator.
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
A function is a subroutine that can be called from several places (re-usable code). Functions can accept arguments (or parameters) so that they can be more generalised and can also return a value to the caller.
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..
use the _itoa function
Normally the return value from the function is through the information from the accumulator.
Well, it depends on what you mean by the type of a function. There are user defined functions and library functions.
In programming, "return 1" typically signifies that a function is ending and sending back the value of 1 to the caller. This can indicate a successful operation or a specific condition, depending on the context of the function. In many programming languages, a return value of 1 can also be used to signal success, while a return value of 0 or another number might indicate an error or different outcome.
In most computer languages, a procedure that returns a value is called a function and a procedure that does not return a value is called a subroutine or subprogram. Usually the languages treat the passing of arguments/parameters differently between functions and subroutines. The C language does not distinguish between them. A subroutine that does not return a value is define as a "void" function indicating that no return value is used or available.
In programming, a procedure is a set of instructions that performs a specific task, while a function is a type of procedure that returns a value. Functions are more versatile and reusable because they can be called multiple times and can return a result. Procedures, on the other hand, are used for tasks that do not require a return value.
In Python, void is not a specific keyword or type like in some other programming languages. Instead, when you want to define a function that does not return a value, you simply define it without a return statement or use return without a value. Such a function is often referred to as returning None by default. For example: def my_function(): print("This function does not return anything.") Here, my_function() executes its code but does not return a value.
The min function is a mathematical and programming function that returns the smallest value from a set of given numbers or elements. In programming, it is often used to find the minimum value in an array or list. For example, in Python, min([3, 1, 4, 1, 5]) would return 1. The min function can also be applied to multiple arguments, identifying the lowest value among them.
A method that return a value should have a return statement. The method signature should indicate the type of return value. While in the case of a method that does not return a value should not have a return statement and in the signature, the return type is void. When using a method that doesn't return a value, a programmer can not get a value from that function, but instead, it can only change variable values and run other methods.