Develop a program for concept of virtual destructor in c++  (in dev c++)

 

#include<iostream> ... Read more »

Views: 129 | Added by: vijoriya | Date: 2021-02-27 | Comments (0)

Develop a program for concept for unary and binary operator overloading in c++  (in dev c++)
Program for Unary operator overloading:
#include<iostream>
#include<conio.h>
using namespace std;
class avi
{
int a;
public:
avi()
{
a=11;
}
avi operator-()
{
a=-a;
}
void show()
{
cout<<a;
}
};
main()
{
avi a1;
-a1;
a1.show();
getch();
}

output:
-11
Program for Unary operator overloading :
#include<iostream>
#include<conio.h>
using namespace std;
class avi
{
int a;
public:
avi(int x)
{
a=x;
}
avi()
{};   //always use default constructor with paramatrizes constructor
avi operator +(avi c)
{
avi s;
s.a=a+c.a;//value of a1 in a and value of a2 i ... Read more »

Views: 127 | Added by: vijoriya | Date: 2021-02-27 | Comments (0)

Write a Program of PALINDROME NUMBER. ... Read more »

Views: 114 | Added by: vijoriya | Date: 2021-02-27 | Comments (0)

Write a Program to show SUM OF THE DIGITS OF A NUMBER ... Read more »

Views: 94 | Added by: vijoriya | Date: 2021-02-27 | Comments (0)

Write a Program to REVERSE A NUMBER

Views: 82 | Added by: vijoriya | Date: 2021-02-27 | Comments (0)

Write a Program to show on the screen PRIME NUMBER. ... Read more »

Views: 102 | Added by: vijoriya | Date: 2021-02-27 | Comments (0)

Write a Program of STRONG NUMBER< ... Read more »

Views: 95 | Added by: vijoriya | Date: 2021-02-27 | Comments (0)

Write a Program to show ARMSTRONG NUMBER.

Views: 113 | Added by: vijoriya | Date: 2021-02-27 | Comments (0)

C++ program to show the PERFECT NUMBER.

... Read more »

Views: 99 | Added by: vijoriya | Date: 2021-02-27 | Comments (0)

 

Write a Program to calculate FACTORIAL OF A NUMBER

... Read more »
Views: 84 | Added by: vijoriya | Date: 2021-02-27 | Comments (0)

« 1 2 3 4 5 6 ... 16 17 »