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
Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Program is to find the area of room: Program is to find the area of room with default values using classes & object class room   {   private:     int len;     i

Define some features of register storage class in c program? The feature of variable defined to be of register type all as follows: Storage - CPU registers Default initia

C program for function  of average int average(int); void main() {           int max=0,c=0;           clrscr();           printf("ENTER THE LIMIT OF INPUT FOR AV


Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

input marks of c and c++ if c grater than equal to 50 grater than 50 you are pass if c greater than equal to 50 c++ less than 50 than supplementry c++ if c less then 50 and c++ gra

How to define a derived class ? A singly inherited derived class id defined by writing : The keyword class. The name of the derived class . A single colon (:).

Write a algorithm to explain the processof wakingbup in morning