This question is very basic and important for the programmers to appear in interview. When programmers appear in any technical interview then they are habitually and casually asked such questions. One of the most basic and important question is

What is difference between parameters and arguments in concept of programming.

Here is very explanatory answer for the mentioned question

Parameters are the the variables used in the methods definition, While as arguments are the actual values that are passed when method is called.

Here we explain about this through programming way.

public int mothodName(int parameter1, int parameter2){

string parameter3 = parameter1*parameter2;

return parameter3;

}

int myargument1 = 150;

int myargument2 = 100;

int result = myclass.methodName(myargument1,myargument2);

 

In above code parameters have been passed into the function at the time of definition and arguments have been passed through the function as actual values.

Leave a Reply

Your email address will not be published. Required fields are marked *