Basic and Advance Programming Question:

How many ways can an argument be passed to a subroutine in programming?

Tweet Share WhatsApp

Answer:

An argument can be passed in two ways in a programming language. They are Pass 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.

Download Programming PDF Read All 34 Programming Questions
Previous QuestionNext Question
What is the difference between procedural and object-oriented programs?What is difference between overloading and overriding in programming language?