The address stored in the pointer is the address of another variable. The value stored at that address is any value stored in any variable. The indirection operator (*) returns the value stored at the address, which itself is stored in the pointer.
The const int * ptr One declares that ptr One is a pointer to a constant integer. The integer itself cannot be changed using this pointer. The int * const ptr Two declares that ptr Two is a constant pointer to integer. After it is initialized, this pointer cannot be reassigned.
Yes, the derived class can override the method and make it private. It then remains private for all subsequent derivation. However, this should be avoided when possible, because users of our class will expect it to contain the sum of the methods provided by its ancestors
An enumerated data type is another user defined type which provides a way for attaching names to numbers thereby increasing comprehensibility of the code. The enum keyword automatically enumerates a list of words by assigning them values 0,1,2, and so on.
Yes, the virtuality is inherited and cannot be turned off.
References cannot be NULL, and they cannot be reassigned. But Pointers offer greater flexibility but are slightly more difficult to use.
The keyword is private. This keyword will prevent member data and functions from outside of the class.
A class object's size in memory is determined by the sum of the sizes of its member variables. Class functions don't take up room as part of the memory set aside for the object.
Some compilers align variables in memory in such a way that 2-byte variables actually consume somewhat more than 2 bytes.
Yes We can, With the simple arrays we can use pointers to combine them into a new larger array.With srtings We can use some of the builtin functions such as strcat to combine strings.
That means An array element that has not been assigned a value. The value is whatever happens to be in memory at a given time. The results of using this member without assigning a value are unpredictable.