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

Amit Singh

Total Post:562

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

    Post:562

    Points:2810
    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!