Re: [algogeeks] Call by reference

2011-08-03 Thread Tushar Bindal
that is exactly what i thought thanks for the clarification -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@

Re: [algogeeks] Call by reference

2011-08-03 Thread Sandeep Jain
I guess the word got a little too confusing... :) I just meant that even thou the call-by-reference feature is not there in C. We can use pointers to get similar results. Regards, Sandeep Jain On Thu, Aug 4, 2011 at 10:43 AM, Tushar Bindal wrote: > we know all these definitions. > > but i thi

Re: [algogeeks] Call by reference

2011-08-03 Thread Tushar Bindal
we know all these definitions. but i think the doubt was regarding the word simulate as we consider call by reference an internal part of C but your statement means that it is a concept of C++, but we just simulate it in C using pointers. Am I correctly interpreting it? On Thu, Aug 4, 2011 at 10

Re: [algogeeks] Call by reference

2011-08-03 Thread Sandeep Jain
We can say call-by-reference is where changes in formal parameters are reflected in actual parameters. call-by-value is where changes in formal parameters are not reflected in actual parameters. However when u have something like int x=10; f(&x); void f(int *p){ *p = 20;} changes in p(formal para

Re: [algogeeks] Call by reference

2011-08-03 Thread Tushar Bindal
Shashank, In C++ we implement it thru reference variables in the function call we can say func(x); in the definition we have, func(int &a) whatever changes we make to a in func() are reflected back in x in the calling function In C, we can simulate i t through pointers call : func(&x); definiti

Re: [algogeeks] Call by reference

2011-08-03 Thread Shashank Jain
@sandeep, i dint get what do you mean by simulate here, as in an example wud be gud. Shashank Jain Delhi College of Engineering On Wed, Aug 3, 2011 at 11:34 PM, Sandeep Jain wrote: > I'd say C language is a truly call-by-value language. C++ supports > call-by-reference. > However in C we can

Re: [algogeeks] Call by reference

2011-08-03 Thread Sandeep Jain
I'd say C language is a truly call-by-value language. C++ supports call-by-reference. However in C we can "simulate" call-by-reference using pointers and address-of operator. Regards, Sandeep Jain On Wed, Aug 3, 2011 at 11:27 PM, NITIN SHARMA wrote: > As we say in C that we do call by referen

[algogeeks] Call by reference

2011-08-03 Thread NITIN SHARMA
As we say in C that we do call by reference but i thk call by reference is something different like we do through "void pointer" in c ++ but it should be call by address in C is it so? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To po