Home > DeveloperSection > Interviews > How many ways can an argument be passed to a subroutine and explain them?

Posted on    July-15-2011 12:27 AM

 Java Java 
 1 Answer(s)
  1170  View(s)
Rate this:

James Smith

Total Post:79

Posted on    July-15-2011 12:00 AM

An argument can be passed in two ways. They are passing by value and 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.

Don't want to miss updates? Please click the below button!

Follow MindStick