Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Using a Friend
Using a friend function is quite easy. The following example explains a friend function to access members of two classes.
class Bclass; // Forward Declaration
class Aclass
{
public :
Aclass(int v)
Avar = v;
}
friend int addup(Aclass &ac, Bclass &bc);
private :
int Avar;
};
class Bclass
Bclass(int v)
Bvar = v;
int Bvar;
int addup(Aclass &ac, Bclass &bc)
return( ac.Avar + bc.Bvar);
void main()
Aclass aobj;
Bclass bobj;
int total;
total = addup(aobj,bobj);
WAP TO PRINT NUMBERS FROM 1-50 WHICH ARE DIVIDED BY 7 void main () { int a; clrscr (); a=1; while (a { if (a%7==0) printf ("%d\n",a); a++; } ge
THIS PROGRAM IS TO MULTIPLY THE TWO COMPLEX NO.S GIVEN BY THE USER #include #include #include struct complex { int real; int imag; }; void main() { clrs
what is the first thing I need to know about Programming?
For this program, you are going to modify your previous program (program 3) so that it will now have a menu to see if the user wants to read the input from a file or interactively.
Write a program that does the following: Calculates the Velocity and Momentum of an object. The formula for the velocity is V=d/t and the formula Momentum is m=mass*velocity. Your
in this problem you are given a board in which some of the elements are placed as shown in below diagram.each element represent a color.fill the other element in the board,such tha
Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send
Encapsulation and Data Hiding The property of being a self-contained unit is known as encapsulation. The idea that the encapsulated unit can be used without knowing how it work
draw the flow chart to print the fibonacci series upto n th terms
Create a program that will accept 3 numbers. The first number (num1) is the common difference and the second number (num2) is the starting number and the 3rd number (num3) is the m
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd