Which of the following is equivalent to a subroutine depending on te programming language

1 answer

A subroutine is a named block of code that can be called and executed throughout a program. In different programming languages, subroutines may be referred to by different names. Here are some equivalents of subroutines in different programming languages:

1. Function (Python, JavaScript, PHP, R)
2. Method (Java, C#, C++, Ruby)
3. Procedure (Pascal)
4. Sub (Visual Basic)
5. Subprogram (Fortran)
6. Callable unit (Ada)
7. Subroutine (Assembly language)

These are just a few examples, and the exact terminology may vary depending on the programming language being used.