ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C++  >>  OOPS
 
 


 

 
 STL interview questions  STL Interview Questions
 OOPS interview questions  OOPS Interview Questions
 C++ General interview questions  C++ General Interview Questions
Question
What is the difference between class and structure?
 Question Submitted By :: Tribhuvan Sharma
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the difference between class and structure?
Answer
# 1
structure is a value type class is reference type,
struct Memory will be on stack and class Memory stored on 
Heap,
struct not suports inheritance and class can?
 
Is This Answer Correct ?    5 Yes 0 No
Guest
 
  Re: What is the difference between class and structure?
Answer
# 2
By default the members of struct are public.
By default the members of class  are priavte.

When an object is created to a class, constructor will be 
called automatically.
But not in struct (if structure having member function with 
structure name)
 
Is This Answer Correct ?    4 Yes 0 No
Mohan
 
 
 
  Re: What is the difference between class and structure?
Answer
# 3
class is a slow access because of heap memory. But struct 
is a faster in access because of stack  memory.



values are initialize at the time of declaration in class
but not in struct.
 
Is This Answer Correct ?    2 Yes 1 No
Konankiswetha
 

 
 
 
Other OOPS Interview Questions
 
  Question Asked @ Answers
 
What normal C constructs work differently in C++?  1
what is object slicing? Wipro4
what is multithreading in c++ , what is difference between multithreading and singlethreading.  1
difference between overloading and overridding  2
Explain the concept of abstracion and encapsulation with one example. What is the difference between them? PCS2
What do you mean by public, private, protected and friendly?  1
Why u change company? BOB-Technologies3
In what situation factory design patterns,DAO design patterns,singleton design patterns should be applied.?  1
How is exception handling carried out in c++?  1
In which cases you use override and new base?  1
is java purely oop Language? Infosys22
what is new modifier in C# HCL6
When is it necessary to use member-wise initialization list in C++?  1
What is R T T I ? Ness-Technologies3
Does c++ support multilevel and multiple inheritance? Wipro5
What is Object and Class? What are the differences between them?  3
What do you mean by inline function?  1
What are the advantages of inheritance?  2
What is an orthogonal base class?  1
how to swap to variables without using thrid variable in java?  3
 
For more OOPS Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com