any one why we call the functions and what its advantage | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

any one why we call the functions and what its advantage

3rd Dec 2016, 9:41 AM
Muhammad Hasnain
Muhammad Hasnain - avatar
3 Answers
+ 6
You call a function when you want to do some specific work. So, instead of typing the same text (telling it what to do) again and again, the programmer can type it once and call it wherever required.
3rd Dec 2016, 4:18 PM
Samriddhi Jain
Samriddhi Jain - avatar
+ 2
for exemple if you need to calculate a max of 4 number with function you write : X = max (max(a,b),max(c,b)); without use function : it's too long . try it
11th Jan 2017, 10:39 PM
aziz
aziz - avatar
0
after creating function we can call it number of time and that will reduce time and space complexity for code ....main advantage is according to need and functionality we can use use it....
3rd Dec 2016, 9:51 AM
Meet Patel
Meet Patel - avatar