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

Get 9,000 Interview Questions & Answers in an eBook.


  • 9500+ Pages
  • 9000 Question & Answers
  • All Tech. Categories
  • 14 MB Content

    Get it now !!


    Send your Resume to 6000 Companies


  • INTERVIEW QUESTIONS LANGUAGES C++ DETAILS
    Question :
    What is the difference between class and structure?



    Category C++ Interview Questions
    Rating (5.0) By 1 users
    Added on 7/19/2006
    Views 1754
    Rate it!
    Answers:

    1:By default,the members of structures are public while that for class is private

    2: strutures doesn't provide something like data hiding which is provided by the classes

    3: structures contains only data while class bind both data and member functions



    The Differences between Structure and Classes are as follows:
    1. By default structure are public while a class is private.
    2. A Class can be inherited while a structure can not be inherited.
    NOTE:- 1.Strutures provide data hiding which is provided by the classes, by public and private.
    2.Structures contains both data as well as member functions.



     Posted by: Himanshu Shrivansh`    

    Contact Himanshu Shrivansh`  Contact Himanshu Shrivansh`

    A structure can also be inherited just like a class


    Contact   Contact


    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
    We can overload assignment operator as a normal function.But we can not overload assignment operator as friend function why?



    View Answer
    What are virtual functions?


    View Answer
    What is the Basic nature of "cin" and "cout" and what concept or principle we are using on those two?

    View Answer
    What is a scope resolution operator?


    View Answer
    What do you mean by inheritance?


    View Answer
    What is the difference between an object and a class?


    View Answer
    What is encapsulation?


    View Answer
    what is defference between constructor and destructor


    View Answer
    Can you explain the term "resource acquisition is initialization?"

    View Answer
    What is the difference between operator new and the new operator?

    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-2009 CoolInterview.com, All Rights Reserved.
    Privacy Policy | Terms and Conditions
    Page URL: http://www.coolinterview.com/interview/6144/default.asp?cachecommand=bypass


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

    0.42