CoolInterview.com - World's Largest Collection of Interview Questions
Send Free SMS
 Interview Questions  
 Our Services  


INTERVIEW QUESTIONS LANGUAGES C++ DETAILS
Question :
Write a program on abstract class.

Posted by: satish on 5/17/2008

Contact satish  Contact satish
Category C++ Interview Questions
Rating (2.0) By 1 users
Added on 5/17/2008
Views 648
Rate it!
Answers:

public __gc class CSquare
{
public:
virtual double Perimeter() = 0;
};



 Posted by: suba    

Contact suba  Contact suba

class raam
{
int a,b;
public:
virtual void display()
{
cout<<"India"<<a;
cout<<"bbsr"<<b;
}
};
class soha:Public raam
{
int c,d;
public:
void display()
{
cout<<"RCM"<<c;
cout<<"MCA"<<d;
}
};
int main()
{
soha ob;
ob.display();
return 0;
}



 Posted by: raamkumar    

Contact raamkumar  Contact raamkumar

A abstract class is one , which has a pure virtual function .The object for pure vitrual() cannot be created.
A pure vitrual () = 0 ; and the definition is overriden in derived cclass.



 Posted by: isha_1    

Contact isha_1  Contact isha_1


If you have the better answer, then send it to us. We will display your answer after the approval.
Name :*
Email Id :*
Answer :*
Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification  Enter the above shown code:*
Inform me about updated answers to this question

   
Related Questions
View Answer
Is it possible to know that how much memory used by a member function or constructor?
View Answer
what are the differences between member function and constructor?
View Answer
why c++ is called as object-oriented language? Here what does object mean?
View Answer
what are the differences between c and c++.what are the advantages the are only in c++ but not in c
View Answer
Write a C++ program that contains a structure named ?Student? having two data members

1) Name

2) CGPA
Declare array of structure ?Student? of size 10 .Populate this array by taking data from file inputFile.txt.File inputFile.txt contains Name and CGPA of the students for current semester. There is a single space between the Name and CGPA.

Display the un-sorted list of students on screen. Compare the CGPAs of all the students and sort Student List with respect to CGPA in ascending or descending order.

Display the sorted list of students, highest CGPA and lowest CGPA on screen and also write the result in File outputFile.txt with tab characters between the Name and CGPA.
Sample InputFile.txt
Ahmer 4.0

Aasim 3.5
Usman 3.4
Maria 2.4
Anila 3.0
Humza 2.6
Junaid 3.0
Talaal 3.8
Haris 3.9
Saira 2.6
Sample OutputFile.txt

Sample outputFile.txt





Name CGPA

===============

Maria 2.4

Humza 2.6

Saira 2.6

Anila 3.0

Junaid 3.0

Usman 3.4

Aasim 3.5

Talaal 3.8

Haris 3.9

Ahmer 4.0

===============

Highest CGPA = 4.0

Lowest CGPA = 2.4

































Sample output of screen:



Unsorted List of Students

Name CGPA

Ahmer 4.0

Aasim 3.5

Usman 3.4

Maria 2.4

Anila 3.0

Humza 2.6

Junaid 3.0

Talaal 3.8

Haris 3.9

Saira 2.6



Sorted List of Students

Name CGPA

===============

Maria 2.4

Humza 2.6

Saira 2.6

Anila 3.0

Junaid 3.0

Usman 3.4

Aasim 3.5

Talaal 3.8

Haris 3.9

Ahmer 4.0

===============

Highest CGPA = 4.0
Lowest CGPA = 2.4
View Answer
how can we made digital calendar by using c++ class
View Answer
What is the difference between composition and inheritance?
View Answer
What is void main mean?
View Answer
create six large matrices in subprogram (100*100) two static and three stack dynamic ...fill two static,two stack matrices with random numbers 1 to 100 ..the code in subprogram must perform large matrix multiplication on static matrices and should repeat this with stack dynamic ...compare and explain result?
View Answer
create six large matrices in subprogram (100*100) two static and three stack dynamic ...fill two static,two stack matrices with random numbers 1 to 100 ..the code in subprogram must perform large matrix multiplication on static matrices and should repeat this with stack dynamic ...compare and explain result?
View Answer

Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

Notify me when better answer is posted!
Email:

View ALL C++ Interview Questions

User Options
Sponsored Links


Copyright ©2003-2010 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions
Page URL: http://www.coolinterview.com/interview/12660/default.asp?cachecommand=bypass


Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Free SMS | Dedicated Servers | Joke of the Day

0.97