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);
Program to design list in c: Write a program in c to insert the values in list void main() { int i=0; char a[20]; clrscr(); printf("Enter the line\n");
C Program to check PRIME NUMBERS main() { int i,k,r,flag; clrscr(); printf("ENTER THE NO. TO CHECK IT IS PRIME OR NOT: ");
C Program for SORTING OF LONG WORD WITH DIFFERENT STRING #include stdio.h> #include conio.h> #include string.h> void main() { char n[50],c[25][25]
What is conversion operator? Explain it with example.
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
(a) Write a procedure (count-even n) that counts the number of even digits in the decimal representation of the number n. For example, (count-even 234) should return 2. (b) Writ
C Program for RADIUS OF CIRCLE #define PI 3.14159 main() { float r,a; clrscr(); printf("ENTER THE RADIUS OF A CIRCLE: ");
#C Why don''t online compilers support the header file? What can I do to resolve this? PS. I have tried , does''nt work either. Thannk in advance.
Default Arguments A default argument is a value that is automatically assigned to a formal variable, if the actual argument from the function call is omitted. e.g. void
palindrome program with minimum character replacements
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