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 encapsulation in ict?
what is difference between thread and programme.
Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box
What is virtual class and friend class?
program for insertion ,deletion,sorting in double link list
Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.
Out of 4 concepts, which 3 C++ Follow?
When you define a integer it gets stored in which data structure?(Stack or a heap)
What is a class?
32 Answers Infosys, TCS, Thylak,
can inline function declare in private part of class?
Whats is abstraction in oops?
what is pointers