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!
Overloading Unary Operators Using Friend Function
class sign
{
int a,b,c;
public:
sign(){}; sign(int,int,int); void putdata(void);
friend void operator-(sign &);
};
void operator-(sign &s)
{s.a=-s.a;s.b=-s.b;s.c=-s.c; }
void sign::putdata(void)
{cout<<"a is: "<<a<<"\n"; cout<<"b is "<"\n"; cout<<"c is "<<c<<"\n";
}
sign::sign(int x,int y, int z)
{a=x;b=y;c=z; }
int main()
{sign s; //Implicit constructor calling s=sign(1000,2,10); //Explicit constructor calling s.putdata();
-s;
s.putdata();
cout<<endl;
s=sign(-2000,2,-5);
return 0;
Write a program to sort an array of strings. Use new and delete operators. Write a program to find the factorial of a number using recursion. If we do not accept the number
main() { int a[5]={1,3,6,7,0}; int *b; b=&a[2]; } The value of b[-1] is
Using Figure 10.2 as a model, illustrate the result of each operation in the sequence ENQUEUE.Q; 4/, ENQUEUE.Q; 1/, ENQUEUE.Q; 3/, DEQUEUE.Q/, ENQUEUE.Q; 8/, and DEQUEUE.Q/ on an i
Description - The TR-069 CPE WAN Management Protocol (CWMP) is a protocol that was created by the Broadband Forum (formally the DSL Forum) which sets out a common method for CPE de
There are ''n'' ants on a ''n+1'' length rod. The ants are numbered from 1 to n and are initially placed at positions starting from position 1 till position n. They are moving eith
how to use and what is implicit and explicit constructor
I hv an assignment to do, I almost done. But i cant find whats wrong- my code is to make a simple calculator using function''s all 4 patterns. I did like this- #include int add
Why shouldn't Matrix class's interface look like an array-of-array? A: Some people build a Matrix class that has an operator[] that returns a reference to an Array object (or po
Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec
Variable Declaration This declaration of variables in the C language is permitted only in the starting of their block, prior to executable program statements. In C++ declaratio
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