Pointers and Array

FOCUSING ON ARRAY AND POINTERS 

Abstract overview of this blog:Pointers and Array:

Here we will be discuss  Arrays first rather than starting up with pointers to array .I will give you a brief introduction of Array its declaration ,definition and few programs of Array.Once you are familiar with Array,we will proceed further to Array using pointers .

Read morePointers and Array

Pointers

Introduction to Pointers

As we all know every variable in C++ has a name and a value.So when we declare a variable , a specific block of memory is allotted to hold its value.Also the size of that variable depends upon the data type  of that variable.


for ex: int a=10;

here variable a is of integer data type and its value is 10 .


Read morePointers

Friend Function and Friend Class

FRIEND FUNCTION.

As we discussed C++ is having a great feature of Data Hiding(Encapsulation),that means Wrapping of data into a Single unit.For ex: all the Data members and member functions are wrapped  up  into a single unit called class.

where according to the concept we apply security or data hiding  by using Access Specifiers PRIVATE and PROTECTED,so according to policy ,if you are not a member you cannot access the private and protected members of a class. However to get rid of this situation we came up with a concept of Friend Function where a non -data member of a class can access the private and protected data members by making a non member friend.

Read moreFriend Function and Friend Class

Function Overloading

Function Overloading

Function Overloading or we can say that overloading functions is a concept of C++ where we can have multiple functions with exactly the same name,but the constrain here is the function should have different arguments.

For ex:

void  Area()

void  Area(int)

int  Area(int,int)

void Area(int ,float)

float Area(float)

Read moreFunction Overloading