Function lecture

I won’t be able to understand void or int function please explain me in detail

I just want to know the diff between void and int function is void is only for char type function and int is for integer type function please explain me

the only difference between void and int function is that return type of void function is null, whereas for int the return type is integer.
So,

void f() -> return;
int f() -> return (integer);

is void function is always used for print type and integer function is for integer return type please explain me

f we want to print something then we are using void functionjust now ✓ and for integer if we want to do some work and take out the value we are using int function please explain mejust n

See , if you just have to do some operations, like printing an array. Traversing on an array. you can do these type of operations in your void function. But if you have to return the operating you have performed on an array in form of a number, you will use int function. For example: Multipication of 2 numbers, average sum of an array. These operations return a number. So we use int function in them.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.