Our Top Courses
Spring Boot
(0 Reviews)
Next JS
(0 Reviews)
Node JS
(0 Reviews)
Vue JS
(0 Reviews)

Functions can take inputs called parameters or arguments, which provide data the function needs to work with. These parameters are usually passed by value, meaning the function works with copies of the data, so changes inside the function don’t affect the original variables.

If you want the function to modify the original data or return complex data like arrays or structures. Functions also return values after completing their task, like a number or a result. The return type must be specified when declaring the function such as int for integers, float for decimals, or void if the function does not return any value.

Returning values lets different parts of your program communicate results easily. Functions may also return arrays or structures using pointers.

int multiply(int x, int y) {
return x * y;
}

Empowering Careers Through Real-World Tech Training

SORT By Rating
SORT By Order
SORT By Author
SORT By Price
SORT By Category