Please enable JavaScript.
Coggle requires JavaScript to display documents.
CA (User-defined Functions, Nested for loop, Actual Parameters (in main…
CA
User-defined Functions
Statements
Method Prototype/ Header
Access specifier (eg. public)
Return type (eg. int)
Method signature [method name + parameters]
Method name (eg. Add)
Method block [block of statements]
Advantages
reuse of function is easier
Occupies less memory
Executes Faster
Program divided into parts
Easier to manage
Ways of defining a function
with return type with parameters
with return type without parameters
without return type with parameters
without return type without parameters
Nested for loop
Tips
if above kind of shape than always inner loop condition j<=i and j++
most often ineer loop iteration printed
Check out :smiley:
if above kind of shape than always inner loop condition j>=i and j--
Actual Parameters (in main program)
Formal parameters (in function)