What is the class of function that when called repeatedly, has the same effect as calling once?
1
A function that fulfills this criteria is int var = 0; void func1() { var = 10; } As you can see, calling fun1 10 times has the same effect as calling it once (assigns 10 to var ) A function that does not fulfill this criteria is int var = 0; void func2() { var++; } Calling func2 10 times results in var being assigned a different value as compared to calling func2 once
naming functions
share | improve this question
asked 4 hours ago
Woofas Woofas
277 1 3
...