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 |
c++ program to swap the objects of two different classes
What are the fields of vtable
What is a scope operator and tell me its functionality?
what is difference between String s=new String("vali"); String s="vali"
Can you inherit a private class?
What does sksksk mean in text slang?
Get me an image implementation program.
What is the expansion of OOPS?
What polymorphism means?
What is ambiguity in inheritance?
What is multilevel inheritance?
i=20;k=0; for(j=1;k-i;k+=j<10?4:3) { cout<<k; } //please comment on the output