sign up I login
 advanced
refer a friend - earn nickels!!

Ask & Discuss Questions with Community & Experts

Moderation Team
Ask iit jee aieee pet cbse icse state board community Discussion Response Post to: Computer Science....BOARDS.....PRACTISE...........
Forum Index -> Computer Science -> View Full Question like the article? email it to a friend.  
Author Message
Aatish (2308)

Blazing goIITian

Olaaa!! Perrrfect answer. 414  [533 rates]

Aatish's Avatar

total posts: 1102    
offline Offline
heres another one.......

#include <iostream.h>
class integer
{
    int m, n;
    public :
        integer(int, int);    // constructor declared
        void display(void)
        {
            cout << " m = " << m << "\n";
            cout << " n = " << n << "\n";
        }
};
integer::integer(int x, int y)     // constructor defined
{
    m = x;
    n = y;
}
main()
{
    integer int1(0, 100);    // implicit call
    integer int2 = integer(25, 75);    // explicit calls
    cout << "\nOBJECT1" << "\n";
    int1.display( );
    cout << "\nOBJECT2" << "\n";
    int2.display( );
}


............................................................................................................................................................................................
There's Light at the end of every Tunnel, so KEEP MOVING....
Best of luck to all my mates....
............................................................................................................................................................................................
 this reply: 0 points  (with Olaaa!! Perrrfect answer.   in 0 votes )   [?]
 
You have to be logged on to rate
  
 

Top Offers for goIITians
Correspondence Courses
Brilliant Tutorials
Narayana Institute
Aakash Institute
Classroom/Crash Courses
Narayana - Kota , Delhi , Others
Brilliant Tutorials - Class , Crash
Aakash Institute - Medical , Engg
Online Test Series
Brilliant Tutorials
Narayana Institute
Aakash Institute
Mahesh Tutorials
AMITY      Sri Chaitanya