What is the difference between struct and class?
Structs are value type whereas Classes are reference type. Structs are stored on the stack whereas Classes are stored on the heap. Value types hold their value in memory where they are declared, but reference type holds a reference to an object memory.
| Is This Answer Correct ? | 0 Yes | 0 No |
Is there any problem with the following: char *a=NULL; char& p = *a;?
How to avoid a class from instantiation?
Inline parameters : What does the compiler do with the parameters of inline function, that can be evaluated in runtime ?
What is time_t c++?
Explain the difference between static and dynamic binding of functions?
What is the use of string in c++?
What is a vector c++?
What is a manipulator in c++?
Can we define a constructor as virtual in c++?
What are virtual functions and what is its use?
What things would you remember while making an interface?
What are c++ storage classes?