+ 2
If not declare return value, what type of return value is assumed?
2 Answers
+ 1
Any function that does not explicitly declare a return type returns int.
0
If a function in a statically typed language (C, C++, Java ect) has a return type (besides void) and returns nothing the compiler/interpreter will throw an error. In a dynamically typed one like Python normally the return value will be None or Null.