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!
Pure Virtual Functions
An abstract class is one, which is used just for deriving some other classes. No object of this class is declared and used in the program. Likewise, there are pure virtual functions which themselves won't be used. Consider the above example with some changes.
class Shape
{
public :
virtual void print() = 0; // Pure virtual
function
};
class Triangle : public Shape
void print()
cout << " I am a Triangle " << endl;
}
class Circle : public Shape
cout << " I am a Circle " << endl;
void main()
Shape S;
Triangle T;
Circle C;
Shape *ptr;
ptr = &T;
ptr -> print();
ptr = &C;
Add words in Dictionary: void Dictionary::add( Object& objectToAdd ) { if( !objectToAdd.isAssociation() ) ClassLib_error( __ENOTASSOC ); else
Program is to search for a given character in a string: Program is to search for a given character in a string and print point of match char *stsearch(char *string, char sea
Selection sort - C program: Write a program to define a selection sort. void main() { clrscr(); int a[100],ch,n; cout cin>>n; for (int i=0;i
Static Member Functions All the objects of the class share static data members of a class. The example above demonstrates how to keep track of all the objects of a class which
Create a pseudocode in getting Calendar Quarter. The program should identify which quarter falls the given date. Note: Consider the date format DDMMYYYY.
Define the Keywords of c language? C keeps a small set of keywords for its personal use. These keywords can't be used as identifiers in the program. Here is the list of keyword
Rule: To determine the canonical form we should OR the min terms. A min term is defined as a Boolean equation of the input if the output is logic '1'. If the input is logic '1'
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
Write an algorithm for multiplication of two sparse matrices using Linked Lists.
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 =
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