What is the difference between pass by reference and pass by
value?

Answer Posted / anwer sayed

Pass By Reference :
In Pass by reference address of the variable is passed to a
function. Whatever changes made to the formal parameter will
affect to the actual parameters
- Same memory location is used for both variables.(Formal
and Actual)-
- it is useful when you required to return more then 1 values
Pass By Value:
- In this method value of the variable is passed. Changes
made to formal will not affect the actual parameters.
- Different memory locations will be created for both variables.

Read more:
http://wiki.answers.com/Q/What_is_the_difference_between_pass_by_value_and_pass_by_reference_in_c#ixzz16MOpWSLk

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is destructor in oop?

741


Please send ford technologies placement paper 2 my mail id

1793


What is destructor example?

725


Explain the advantages of inheritance.

800


What is the importance of oop?

754






If a=5, b=6, c=7, b+=a%c*2. What is the final value of b?

1049


What are main features of oop?

814


What is polymorphism in oops?

692


What is difference between data abstraction and encapsulation?

755


what are the different types of qualifier in java?

1963


What is difference between polymorphism and inheritance?

758


What is oops?what is its use in software engineering?

686


This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.

1782


Which language is not a true object oriented programming language?

787


How to use CMutex, CSemaphore in VC++ MFC

4481