function ekak athuledi calculate krna value ekak apita function eka athuledima print krnne nathuwa, function eken eliyedi ea value eka variable ekakata assign krgnna or wena calculation ekakata use krnda puluwn. ehema krnda nm api ea ona value eka function eken eliyta denna ona. That's what we call as returning
I'm giving a simple example. this is a function which returns the sum of given three input values.(normally we do advanced computations inside functions .I take this addition example for simplicity) int sum(int a ,int b,int c){ return a+b+c; } here, outside the function you are doing some other calculation which need the sum of given 3 inputs. If you need to get the sum of 4 5,80,600 you can simply call the function providing the values for a,b,c Like this, int result=sum(4,7,600) here thesum value for given inputs are assigned to the variable 'result' but if you didn't put 'return a+b+c' statement in the sum function, you cant use int result=sum(4,7,600) to get the sum. Simply returning means it's throwing the value out from the function, as in some where else you can catch it! Further you can clarify from this video : th-cam.com/video/yyla9mTV678/w-d-xo.html Or else just try it on your own C code !
Thank youuuu ❤
Thanks miss 😍😍
Thank you akki
Akka \ type karanne kohomad
Thank u
Miss, C programming class karanawada ??
ow. please contact via WhatsApp Business : +94707905830 or Email : academy.tutorsl@gmail.com
Return kiyala kiyanne mokadda akki
function ekak athuledi calculate krna value ekak apita function eka athuledima print krnne nathuwa, function eken eliyedi ea value eka variable ekakata assign krgnna or wena calculation ekakata use krnda puluwn. ehema krnda nm api ea ona value eka function eken eliyta denna ona. That's what we call as returning
@@tutorSL example please
I'm giving a simple example. this is a function which returns the sum of given three input values.(normally we do advanced computations inside functions .I take this addition example for simplicity)
int sum(int a ,int b,int c){
return a+b+c;
}
here, outside the function you are doing some other calculation which need the sum of given 3 inputs.
If you need to get the sum of 4 5,80,600 you can simply call the function providing the values for a,b,c Like this,
int result=sum(4,7,600)
here thesum value for given inputs are assigned to the variable 'result'
but if you didn't put 'return a+b+c' statement in the sum function, you cant use int result=sum(4,7,600) to get the sum.
Simply returning means it's throwing the value out from the function, as in some where else you can catch it!
Further you can clarify from this video :
th-cam.com/video/yyla9mTV678/w-d-xo.html
Or else just try it on your own C code !
@@tutorSL yeah madam i will do but could you please let me know how does this use in arduino? How does this use in over there ?
just because i have got used to do in arduino so can i try it over there?
😍😍