0

Guys any one please say what is function and what is function call please i searched in google but not understanding

Fuction

29th Oct 2019, 1:46 PM
THE INDUSTRY
THE INDUSTRY - avatar
2 Réponses
+ 3
I advise you reading again the courses (c, python and c++, as I saw in your profile). A function is a piece of code that performs actions. It is never executed until you call it. When you call it, the code inside the function will be executed, then it goes back from where the function was called. An exemple in python : #declare à function : code not executed yet def func(): print("Hi!") #call the function : code inside func is going to be executed func() #returns point of the function In this exemple, there is in fact two function calls : the first one while calling 'func', and the second one inside 'func' while calling 'print'. A function can take parameters, but it's better you take a look at the SL course.
29th Oct 2019, 1:57 PM
Théophile
Théophile - avatar