what is code for call by value and call by reference?
Answer / anilkumar.s
#include<iostream.h>
class call
{int a,b;
void callbyvalue(int x,int y)
{ a=x;
b=y;
int c;
c=a;
a=b;
b=c;
}
void callbyreference(int *x,int *y)
{
a=x;
b=y;
int *t;
t=a;
a=b;
b=t;
}
void display()
{
cout<<" a=" <<a<<" "<<"b="<<b;
}
void main()
{
call o;
o.callbyvalue(10,20)//value can't be swap
o.callbyreference//value can be swaP
Is This Answer Correct ? | 7 Yes | 1 No |
What is the difference between procedural programming and oops?
why constructor cannt be declar virtually? why destructor cannt be overloaded?
How is the using() pattern useful? What is IDisposable? How does it support deterministic finalization?
define a string class. overload the operator == to compare two strings
2 Answers Birla, Ericsson, HCL, Infosys, Infotech, MCAS, Satyam,
What does sksksk mean in text slang?
How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction
what are the characteristics of oops?
write knight tour problem which is present in datastructure
What is abstraction in oop?
What is multilevel inheritance explain with example?
WHEN A COPY CONSTER IS CALL ?
In which cases you use override and new base?