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!
Create Complex number using constructor:
class complex
{
private:
int real,ima;
static int count;
public :
complex (int a,int b) //constructor
real=a;
ima=b;
}
complex() //default constructor
real=0;
ima=0;
void show()
cout<< real<<"\n"< } friend complex sum(complex ,complex); ~complex () // destructor { } }; int complex :: count=15; complex sum( complex a,complex b) { complex c3; c3.real= a.real + b.real; c3.ima= a.ima + b.ima; return c3; } void main() { complex a,b,c; clrscr(); a = complex(10,12); //constructor b= complex(12,10); c=sum(a,b); c.show(); //cout < getch(); }
friend complex sum(complex ,complex);
~complex () // destructor
};
int complex :: count=15;
complex sum( complex a,complex b)
complex c3;
c3.real= a.real + b.real;
c3.ima= a.ima + b.ima;
return c3;
void main()
complex a,b,c;
clrscr();
a = complex(10,12); //constructor
b= complex(12,10);
c=sum(a,b);
c.show();
//cout < getch(); }
getch();
hwat is the area fsdjlakl;aeklfjtealrtl;gka
Primarily the term alignment refers the tendency of an address pointer value to be a multiple of some power of two. Thus a pointer with two byte alignment contains a zero in the le
A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''a''-''z'') and the asci
padovan string program 1 : package test.padovanstring; public class PadovanString { public int stringOccurrences(int n, String str){ if(n >= 40) return -
Define How Passing Arrays to a Function? A complete array can be passed to a function as an argument. The manner in which the array is passed be different from that of an ordin
P o i n t er s to Members: In C a pointer is created to locate the address of another variable for faster access. Consider the following example. int x, *p; p =
What is difference between require_once (), require(), include()? require() includes and evaluates a specific file, if file isn't found then it shows a Fatal Error. require_
Example for external storage class - computer programming? extern double sin (double); In a function prototype, for the sin() function its function definition ~ we can write
write a program to find area of curve y=f(x) between x and x=b,integrate between the limits a and b using c #include float start_point, /* GL
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