Geeks Talk

Prepare for your Next Interview




Call by Value and Call by Reference

This is a discussion on Call by Value and Call by Reference within the C and C++ forums, part of the Software Development category; Call by Value and Call by Reference In this tutorial you will learn about C Programming - What is difference between call by value and call by reference in function? The ...


Go Back   Geeks Talk > Software Development > C and C++

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-06-2006
Moderator
 
Join Date: Oct 2005
Posts: 719
Thanks: 1
Thanked 98 Times in 74 Posts
Lokesh M is on a distinguished road
Call by Value and Call by Reference

Call by Value and Call by Reference

In this tutorial you will learn about C Programming - What is difference between call by value and call by reference in function?

The arguments passed to function can be of two types namely
1. Values passed
2. Address passed

The first type refers to call by value and the second type refers to call by reference.


For instance consider program1


Read More...
Reply With Quote
The Following User Says Thank You to Lokesh M For This Useful Post:
Sponsored Links
  #2 (permalink)  
Old 07-12-2006
Contributing Member
 
Join Date: May 2006
Posts: 84
Thanks: 0
Thanked 9 Times in 6 Posts
timmy is on a distinguished road
Re: Call by Value and Call by Reference

It was useful information about passing arguments to functions. In call by value argument gets passed as variables and in call by reference address gets passed. Does it mean if we use call by reference the execution time would be faster for the function since we the address gets accessed directly. If not why is it so?
Reply With Quote

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved