Arguments passing mechanism, C/C++ Programming

Arguments Passing Mechanism

C++ supports the following argument passing mechanisms:

i).  Pass by value: A copy of the arguments value is made and passed to the called function.

ii). Pass by reference: This mechanism allows the actual variable rather than a copy to be passed to a

function. One advantage is that it can allow more than one value to be derived from the function, unlike pass by value that returns only one value from the called function.

Syntax:

return_type function_name(data_type & parameter) 

 

 

Posted Date: 8/21/2012 11:49:04 AM | Location : United States







Related Discussions:- Arguments passing mechanism, Assignment Help, Ask Question on Arguments passing mechanism, Get Answer, Expert's Help, Arguments passing mechanism Discussions

Write discussion on Arguments passing mechanism
Your posts are moderated
Related Questions

Problem: (a) A GUI can contain text-fields, buttons, and other labels. A button usually triggers an event on the GUI. Explain the different processes in registering an event

a c program to find the volume of sphere

There are ''''n'''' ants on a ''''n+1'''' length rod. The ants are numbered from 1 to n and are initially placed at positions starting from position 1 till position n. They are mov

For the circuit shown in Figure, verify (a) the battery voltage V , (b) the total resistance of the circuit, and (c) the values of resistance of resistors R 1 , R 2 and

A: Mostly can be overloaded. The only C operators which can't be are. and?: (and sizeof, that is technically an operator). C++ adds a few of its own operators, mostly which can be

Program to store family members details in C++: #include #include #include struct record {   char name[30];   int age;   char state[40]; }x; //cal

program to find if a no . is prime or not


pls say code for this above..