Sololearn: Learn to Code
+ 4
functions have parameters for example int doSomthing(int i, int j){ int sum = i+j; return(sum);} i and j inside the parenthisis are formal parameters these variables hold the values of the arguments you passed when you make a call to the function. doSomthing(5,6); Here 5,6 are actual parameters or just arguments which are passed to the function they are assigned in order so i = 5 & j = 6. inside the body of the function sum is then assigned the value of i+j then returned. doSomthing(5,6) would return 11
29th Dec 2018, 1:58 PM
D_Stark - avatar