What is a friend function? Use of friend and encapsulation are contradictory- common critically?

As per the concept when data is declared as private inside a class, it is not accessible from outside the class. A function that is not a member or an external class will not a member or an external class will not be able to access the private data. A …

What is the difference between a constant pointer and a pointer to a constant?

Constant pointer: A Constant pointer is a pointer variable whose content can not be changed once it is assigned. Ex: int * const ptr 1=4; In the above statement, ptr is a constant pointer that stores the address of value 4. That means we can not change the content of …

What is the use of this Pointer?

The member function of every object that has access to a pointer is called this, which pointer to the object itself. When a member function is called, it comes into existence with the value into existence with of this set to the address of the object. Example: Consider the following …

What do you mean by call by reference and write Advantage?

In the call by reference method the argument of calling(;) function is passed by reference called(.) function become aliases(giving alternate name) to the actual argument this means that, when the function is working with its own argument it is actually working on the actual argument of calling function. Example : …

What is an object?

An instance of the class is called an object the object can be defined as a concept, abstraction, or thing with crisp boundaries and meaning. All objects have a distinguishable identity. The term identifies meaning objects are distinguished by their interrupt, existence and not by descriptive properties that they may …

Know How to Work Computer?

Computers solve mathematical and logical problems by receiving data at the data entry level, organizing them conveniently, and processing the receiving data. the processing results are then displayed on a computer monitor or printed on paper. Computers store data, information, or results in memory for as short a time as …