What is class invariant?
Answer / subham chaudhary
A class invariant is a condition that defines all valid states for an object. It is a logical condition to ensure the correct working of a class. Class invariants must hold when an object is created, and they must be preserved under all operations of the class. In particular all class invariants are both preconditions and post-conditions for all operations or member functions of the class.
Is This Answer Correct ? | 0 Yes | 0 No |
What is else syntax in c++?
What is meant by entry controlled loop? What all C++ loops are exit controlled?
What is the difference between Pointer and a Reference? When you would use them?
Explain the scope of resolution operator.
How do you decide which integer type to use?
What is the importance of mutable keyword?
Write a program to find the Fibonacci series recursively.
How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?
How the memory management in vectors are being done. What happens when the heap memory is full, and how do you handle it ?
Why do we need runtime polymorphism in c++?
What language does google use?
Write a code/algo to find the frequency of each element in an array?