HOW MANY WAYS CAN AN ARGUMENT BE PASSED TO A SUBROUTINE AND EXPLAIN THEM?

Amit Singh

Total Post:565

Points:2825
Posted by  Amit Singh
Java 
 935  View(s)
Ratings:
Rate this:
  1. Amit Singh

    Post:565

    Points:2825
    How many ways can an argument be passed to a subroutine and explain them?

    An argument can be passed in two ways:

    1. passing by value
    2. passing by reference.
    Passing by value: This method copies the value of an argument into the formal parameter of the subroutine.
    Passing by reference: In this method, a reference to an argument (not the value of the argument) is passed to the parameter.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!