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
What is destructor in oop?
Please send ford technologies placement paper 2 my mail id
What is destructor example?
Explain the advantages of inheritance.
What is the importance of oop?
If a=5, b=6, c=7, b+=a%c*2. What is the final value of b?
What are main features of oop?
What is polymorphism in oops?
What is difference between data abstraction and encapsulation?
what are the different types of qualifier in java?
What is difference between polymorphism and inheritance?
What is oops?what is its use in software engineering?
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.
Which language is not a true object oriented programming language?
How to use CMutex, CSemaphore in VC++ MFC