Unit 3
Unit 3
Arrays
An array is a very popular, linear, homogenous, and useful data structure that is used to
store similar types of data elements in contiguous memory locations under one variable name.
Declaration:
int a[5];
It tells the compiler that ‘a’ is an integer type of array, and it should store five integers.
In this example, 5 is the subscript enclosed within square brackets. The compiler reserves two
bytes of memory for each integer array element; that is, 10 bytes are reserved for storing five
integers in the memory.
In the same way, arrays of different data types are declared as follows:
char ch[10];
float real[10];
long num[5];
Here, five elements are stored in an array ‘a’. The array elements are stored sequentially in
separate locations. Then, the question arises of how to call each element individually from this
bunch of integer elements. The reading of array elements begins from zero.
Array elements are accessed with the name of the array, and the number within the square
brackets specifies the element number. In other words, array elements are called with array
names followed by element numbers.
1
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
Characteristics of Arrays:
1. The Declaration int a[5] is nothing but a creation of five variables of integer types.
Instead of declaring five variables for five values, the programmer can define them in an
array.
2. All the elements of an array share the same name, and they are distinguished from one
another with the help of an element number.
3. The element number in an array plays a major role for calling each element.
4. Any particular element of an array can be modified separately without disturbing the
other elements.
For example, int a[5] = {1,2,3,4,8};
If the programmer needs to replace 8 with 10, he/she is not required to change all the
other elements except 8. To carry out this task, the statement a[4] = 10 can be used.
Here, the other four elements are left unchanged.
5. The array elements are stored in contiguous memory locations. The amount of storage
required for holding the elements of the array depends on its type and size. The total size
in bytes for a single-dimensional array is computed as shown below.
Total bytes = size of (data type) × size of array
Example:
2
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
Accessing Array Elements through Pointers: We can quickly and easily access array elements
using pointers, as these elements are stored in contiguous memory locations. A pointer variable
contains an address, and it is easy to manipulate data with the help of addresses. When a pointer
is incremented, the address gets incremented, and we can access the contents of memory
locations. This particular method requires less memory; hence, execution is fast.
int main()
{
int *p,num[5] = {1,2,3,4,5},j;
p=&num[0];
cout<<“Number Address”<<endl;
for (j=0;j<5;j++)
cout<<“ ”<<*(p+j) <<“ ”<<unsigned(p+j)<<endl;
return 0;
}
Output:
Number Address
1 65452
2 65454
3 65456
4 65458
5 65460
Arrays of Pointers: ‘C++’ language also supports arrays of pointers. It is nothing but a
collection of addresses. Here, we store the addresses of variables for which we have to declare
arrays as pointers.
int main()
{
int *arrp[3];
int arr[3]={5,10,15}, k;
for(k=0;k<3;k++)
arrp[k]=arr+k;
3
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
Output:
Address Element
65418 5
65420 10
65422 15
Passing Array Elements to A Function: We can pass elements to a function by using call-by-
value or call-by-address methods. In the call-by-value method, elements (values) of an array are
passed to the function; whereas in the call-by-address method, addresses of elements are passed
to the function.
void display(int);
int main()
{
int num[5]={1,2,3,4,5},i;
cout<<“\nElements in the reverse order are as follows:”;
for(i=4;i>= 0;i--)
{
display(num[i]);
}
4
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
return 0;
}
void display(int x)
{
cout<<“ ”<<x;
}
int main()
{
int num[5]={1,2,3,4,5},i;
In the above program, addresses of individual array elements are passed to the
function display(int *). The x contains the address of an array element, and *x is the
value stored at that address.
return 0;
}
void display(int &x)
{
cout<<x<<"\t";
}
It is also possible to pass the entire elements of an array to a function instead of passing
the individual elements of an array. The following program explains the concept:
In the above program, the address of the zeroth element, that is, &num[0], is passed to
the function show(). The for loop is used to access the array elements using pointers. The
show() function is invoked with two arguments. The first argument is the address of the
zeroth element, and the second one is the number that represents the total number of
elements in the array.
6
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
Initialization of Arrays Using Functions: The programmers always initialize the arrays using
statements such as int d[] = {1,2,3,4,5}; instead of this, the function can also be directly called to
initialize the array. The following program illustrates this point.
#include <iostream>
using namespace std;
int c();
int main()
{
int d[3] = {c(),c(),c()};
cout<<"Array d[] elements are :"<<endl;
for (int k=0;k<3;k++)
cout<<d[k]<<endl;
return 0;
}
int c()
{
int n;
cout<<"Enter Number to store the element into an arrray :";
cin>>n;
return n;
}
Output:
Enter Number to store the element into an arrray :1
Enter Number to store the element into an arrray :2
Enter Number to store the element into an arrray :3
Array d[] elements are :
1
2
3
7
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
The arrangement of array elements shown in the figure only for the sake of
understanding. Actually, the elements are stored in continuous memory locations. The two-
dimensional array is a collection of two one-dimensional arrays. The meaning of the first
argument is in x[3][3] and means the number of rows; that is, the number of one-dimensional
arrays, and the second argument indicates the number of elements. The x[0][0] means the first
element of the first row and column. In one row, the row number remains the same but the
column number changes. The number of rows and columns is called the range of the array. A
two-dimensional array clearly shows the difference between logical assumptions and the
physical representation of data. The computer memory is linear and any type of array may one,
two- or multi-dimensional array it is stored in continuous memory location as shown in figure.
8
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
int main()
{
int i,j;
int a[3][3] = {1,2,3,4,5,6,7,8,9};
cout<<“\n Array elements and address ”;
cout<<“\n \t Col-0 Col-1 Col-2”;
cout<<“\n \t ====== ====== ====== ”;
for (i=0;i<3;i++)
{
for (j=0;j<3;j++)
cout<<“\t ”<< a[i][j];
}
return 0;
}
Pointers and Two-Dimensional Arrays: A matrix can represent the two-dimensional elements
of an array. In order to display the elements of the two-dimensional array using pointers, it is
essential to have ‘&’ operator as a prefix with the array name followed by element numbers.
/*Write a program to display array elements and their addresses using pointers.*/
int main()
{
int i,j,*p;
int a[3][3] = {{1,2,3},{4,5,6},{7,8,9}};
9
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
Output:
The ‘C++’ program helps in creating an array of multi dimensions. The compiler
determines the restrictions on it.
A three-dimensional array can be considered an array of arrays of arrays. The outer array
contains three elements. The inner array is two dimensional with regard to size [3][3].
10
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
int main()
{
int array_3d[3][3][3];
int a,b,c;
for (a=0;a<3;a++)
for (b=0;b<3;b++)
for (c=0;c<3;c++)
array_3d[a][b][c]=a+b+c;
for (a=0;a<3;a++)
{
cout<<“\n”;
for (b=0;b<3;b++)
{
for (c=0;c<3;c++)
cout<<“ ”<<array_3d[a][b][c];
cout<<“\n”;
}
}
return 0;
}
11
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
Pointers
A pointer is a memory variable that stores a memory address. Pointers can have any
name, and it is declared in the same fashion as other variables, but it is always denoted by ‘*’
operator.
Features of Pointers
Pointer Declaration
Example:
int *x;
float *f;
char *y;
In the first statement, ‘x’ is an integer pointer, and it informs the compiler that it holds the
address of any integer variable. In the same way, ‘f’ is a float pointer that stores the address of
any float variable, and ‘y’ is a character pointer which stores the address of any character
variable.
12
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
The indirection operator (*) is also called the dereference operator. When a pointer is
dereferenced, the value at that address stored by the pointer is retrieved.
#include <iostream>
using namespace std;
int main()
{
int n;
Output:
Enter a Number = 10
Value of n = 10
Address of n=4068
/* Write a program to declare a pointer. Display the value and address of the variable-
using pointer. */
#include <iostream>
using namespace std;
int main()
{
int *p;
int x=10;
p=&x;
return 0;
}
13
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
Output:
x=10 &x=0x22ff18
x=10 &x=0x22ff18
From the above table, while referring to the first entry, we can observe that on increment of the
pointer variable for integers, the address is incremented by two; that is, 4046 is the original
address and on increment, its value will be 4048, because integers require two bytes. Similarly,
when the pointer variable for integer is decreased, its address 4048 becomes 4046.
int main()
{
int x=10;
int *p;
p=&x;
cout<<“\n Address of p:”<<unsigned(p);
p=p+4;
cout<<“\n Address of p:”<<unsigned(p);
p=p-2;
cout<<“\n Address of p:”<<unsigned(p);
return 0;
}
Output:
Address of p:65524
Address of p:65532
Address of p:65528
14
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
#include <iostream>
using namespace std;
int main() {
int x=10;
int *p;
p=&x;
cout<<"\n Value of x:"<<*p;
*p=*p+10;
cout<<"\n Value of x:"<<*p;
*p=*p-2;
cout<<"\n Value of x:"<<*p;
return 0;
}
Output:
Value of x: 10
Value of x: 20
Value of x: 18
Pointer to Pointer
Pointer to pointer is a pointer that stores the address of another pointer. There can be a
chain of pointers depending on applications/requirements. In the Figure,, x is a simple variable, p
is a pointer to the variable x, and q is a pointer to p. The values of variables ‘x,* p, and **q’ are
shown in the boxes, and their addresses are shown outside the boxes.
#include <iostream>
using namespace std;
int main() {
int x=10;
int *p;
int **q;
15
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
int ***z;
p=&x;
q=&p;
z=&q;
cout<<"\n Value of x = "<<x;
cout<<"\n Value of x = "<<*p;
cout<<"\n Value of x = "<<**q;
cout<<"\n Value of x = "<<***z;
cout<<"\n Adderss of x "<<unsigned(&x);
cout<<"\n Adderss of p "<<unsigned(&p);
cout<<"\n Adderss of q "<<unsigned(&q);
return 0;
OUTPUT
Value of x = 10
Value of x = 10
Value of x = 10
Value of x = 10
Adderss of x 2293528
Adderss of p 2293524
Adderss of q 2293520
void Pointers
int main()
{
int i;
char c;
void *the_data;
16
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
i = 6;
c = 'a';
the_data = &i;
cout<<"The data points to the integer value :"<< *(int*) the_data;
the_data = &c;
cout<<"\nThe data now points to the character:"<< *(char*) the_data;
return 0;
}
Output:
The data points to the integer value : 6
The data now points to the character: a
Uninitialized pointers are known as wild pointers because they point to some arbitrary
memory location and may cause a program to crash or behave badly.
#include <iostream>
using namespace std;
int main()
{
int *p; /* wild pointer */
*p = 12; /* Some unknown memory location is being corrupted. This
should never be done. */
cout<<unsigned(p);
Please note that if a pointer p points to a known variable then it’s not a wild pointer. In
the below program, p is a wild pointer till this points to a.
int main()
{
int *p; /* wild pointer */
int a = 10;
p = &a; /* p is not a wild pointer now*/
*p = 12; /* This is fine. Value of a is changed */
}
17
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
this Pointer
#include <iostream>
using namespace std;
class integer
{
int x;
public:
void show_addr();
};
void integer::show_addr()
{
cout<<"My Object's Address="<<this<<"\n";
}
int main() {
integer a,b,c;
cout<<"A addr: "<<&a<<endl;
cout<<"B addr: "<<&b<<endl;
cout<<"C addr: "<<&c<<endl;
a.show_addr();
b.show_addr();
c.show_addr();
return 0;
Output:
A addr:0x22ff1c
B addr:0x22ff18
C addr:0x22ff14
18
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
My Object's Address=0x22ff1c
My Object's Address=0x22ff18
My Object's Address=0x22ff14
#include <iostream>
using namespace std;
class Add
{
int val;
public:
void setdata(int val)
{
this->val=val;
}
void display()
{
cout<<val<<endl;
}
Add sum(Add v2)
{
val=val+v2.val;
return *this;
}
};
int main() {
Add v1,v2;
v1.setdata(3);
v2.setdata(4);
Add s;
s=v1.sum(v2);
cout<<"Sum is=";
s.display();
return 0;
Output:
Sum is=7
19
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
It is possible to declare a pointer that points to the base class as well as the derived class.
One pointer can point to different classes. For example, X is a base class and Y is a derived class.
The pointer pointing to X can also point to Y.
/* Program to declare a pointer to the base class and access the member variable of base
calss.*/
class B
{
public :
int b;
void display()
{
cout<<"b = " <<b <<endl;
}
};
class D : public B
{
public :
int d;
void display()
{
cout<<"b= " <<b <<"\n" <<" d="<<d <<endl;
}
};
int main()
{
B *cp;
B base;
cp=&base;
cp->b=100;
// cp->d=200; Not Accessible
cout<<"\n cp points to the base object \n";
cp->display();
D d;
cout<<"\n cp points to the derived class \n";
cp=&d;
cp->b=150;
//cp->d=300; Not accessible
cp->display();
return 0;
}
20
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
Output:
/* Program to declare a pointer to the derived class and access the member variable of base
and derived class.*/
#include <iostream>
using namespace std;
class B
{
public :
int b;
void display()
{
cout<<"b = "<<b <<endl;
}
};
class D : public B
{
public:
int d;
void display()
{
cout<<"b= "<<b <<endl;
cout<<"d= "<<d <<endl;
}
};
int main()
{
D *cp;
D d;
cp=&d;
cp->b=100;
cp->d=350;
cout<<"\n cp points to the derived object \n";
cp->display();
return 0; Output:
} cp points to the derived object
b= 100
d= 350
21
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
Polymorphism
The word poly means many, and morphism means several forms. Both the words are
derived from Greek language. Thus, by combining these two words, a new whole word called
polymorphism is created, which means various forms.
In C++, the function can be bound at either compile time or run time. Deciding a function
call at compile time is called compile time or early or static binding. Deciding a function call at
run time is called run time or late or dynamic binding. Dynamic binding permits to suspend the
decision of choosing a suitable member function until run time. Two types of polymorphism are
shown in Figure.
Binding in C++
Binding refers to the process that is to be used for converting functions and variables into
machine language addresses. The C++ supports two types of binding: static or early binding and
dynamic or late binding.
Static (Early) Binding: By default, matching of function call with the correct function definition
happens at compile time. This is called static binding or early binding or compile-time binding.
Static binding is achieved using function overloading and operator overloading. Even though
there are two or more functions with same name, compiler uniquely identifies each function
depending on the parameters passed to those functions. Consider the following example.
22
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
#include <iostream>
using namespace std;
class Base
{
public:
void display()
{
cout<<"Base"<<endl;
}
};
Explanation: In the above program both the classes contain display() member function. Both the
classes contain a similar function name. In function main() Hence, in order to invoke the
display() function of the base class, the scope access operator is used. When base and
derived classes have similar function names, in such a situation, it is very essential to provide
information to the compiler at compile time about the member functions.
23
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
Dynamic (Late) Binding: C++ provides facility to specify that the compiler should match
function calls with the correct definition at the run time; this is called dynamic binding or late
binding or run-time binding. Dynamic binding is achieved using virtual functions, base class
pointer points to derived class object and Inheritance.
In inheritance, the properties of existing classes are extended to the new classes. The new
classes that can be created from the existing base class are called as derived classes. The
inheritance provides the hierarchical organization of classes. It also provides the hierarchical
relationship between two objects and indicates the shared properties between them. All derived
classes inherit properties from the common base class. Pointers can be declared to the point base
or derived class. Pointers to objects of the base class are type compatible with pointers to objects
of the derived class. A base class pointer can point to objects of both the base and derived class.
In other words, a pointer to the object of the base class can point to the object of the derived
class; whereas a pointer to the object of the derived class cannot point to the object of the base
class.
Virtual Functions:
A virtual function is a member function that is declared with in a base class and is
redefined by derived class.
To create a virtual function, precede the functions declaration in the base class with the
keworh ‘virtual’. It signals the compiler that we don’t want static linkage for this function. So,
24
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
when a class containing virtual function is inherited, the derived class redefines the virtual
function to fit its own needs. i.e., the definition creates a specific method.
1. The virtual function should not be static and must be a member of a class.
2. The virtual function may be declared as a friend for another class. An object pointer can
access the virtual functions.
3. A constructor cannot be declared as virtual, but a destructor can be declared as virtual.
4. The virtual function should be defined in the public section of the class. It is also possible
to define the virtual function outside the class. In such a case, the declaration is done
inside the class, and the definition is outside the class. The virtual keyword is used in the
declaration and not in the function declaration.
5. It is also possible to return a value from virtual functions similar to other functions.
6. The prototype of the virtual function in the base class and derived class should be exactly
the same. In case of a mismatch, the compiler neglects the virtual function mechanism
and treats these functions as overloaded functions.
7. Arithmetic operations cannot be used with base class pointers.
8. If a base class contains a virtual function and if the same function is not redefined in the
derived classes, in such a case, the base class function is invoked.
Example:
class Base
{
public:
virtual void display()
{
cout<<"Base"<<endl;
}
};
25
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
{
cout<<"Derived"<<endl;
}
};
int main()
{
Derived b;
Base *a=&b;
a->display();
return 0;
Output:
Derived
/* C++ program to use pointer for both base and derived class and call the member
function. Use virtual keyword. */
#include <iostream>
using namespace std;
class super
{
public:
virtual void display()
{
cout<<"\n In function display() - class super";
}
virtual void show()
{
cout<<"\nIn function show() - class super";
}
}
;
class sub: public super
{
public:
void display()
{
cout<<"\nIn function display() class sub";
}
void show()
{
26
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
Output:
/*C++ program to create array of pointers. Invoke functions using array objects.*/
#include <iostream>
using namespace std;
class A
{
public:
virtual void show() { cout<<"A\n"; }
};
class B : public A
{
public:
27
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
Output:
A
B
C
D
E
28
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
Pure virtual Functions are virtual functions with no definition. Declaration of pure virtual
function
In the above declaration of the function, the display() is a pure virtual function. The
assignment operator is not used to assign zero to this function. It is used just to instruct the
compiler that the function is a pure virtual function and that it will not have a definition.
A pure virtual function declared in the base class cannot be used for any operation. The class
containing the pure virtual function cannot be used to declare objects. Such classes are known as
abstract classes or pure abstract classes.
#include <iostream>
using namespace std;
class Base
{
public:
virtual void display()=0;
};
29
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
Explanation: In the above program, the display() function of the base class is declared a pure
function. The pointer object *a holds the address of the object of the derived class and invokes
the function display() of the derived class. Here, the function display() of the base class does
nothing. If we try to invoke the pure function using the statement b->Base::display(), the
program is terminated with the error “abnormal program termination.”
Abstract Classes
Abstract Class is a class which contains at least one Pure Virtual function in it. Abstract
classes are used to provide an Interface for its sub classes. Classes inheriting an Abstract Class
must provide definition to the pure virtual function, otherwise they will also become abstract
class.
While defining such an abstract class, the following points should be kept in mind:
Example:
class Base //Abstract base class
{
public:
virtual void show() = 0; //Pure Virtual Function
};
int main()
{
//Base obj; //Compile Time Error
Base *b;
Derived d;
30
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
b = &d;
b->show();
}
#include <iostream>
using namespace std;
int main()
{
Base *b;
Derived d;
b = &d;
b->show();
}
Output:
31
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
#include <iostream>
using namespace std;
class CPolygon
{
protected:
int width, height;
public:
void get (int first, int second)
{
width= first;
height= second;
}
virtual int area()=0;
};
class CRectangle: public CPolygon
{
public:
int area()
{
return (width * height);
}
};
ptr_polygon = &rectangle;
ptr_polygon->get(2,2);
cout << ptr_polygon->area () << endl;
32
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.
Unit 3 Arrays, Pointers, Memory Models and Polymorphism
ptr_polygon = ▵
ptr_polygon->get(2,2);
cout << ptr_polygon->area () << endl;
return 0;
}
Output:
4
2
Object Slicing: Virtual functions can be invoked using a pointer or reference. If we do so, object
slicing takes place. The following program takes you to the real thing:
class Base
{
public:
virtual void display()=0;
};
Output:
Derived
Derived
33
Suresh Yadlapati, M. Tech, (Ph. D), Dept. of IT, PVPSIT.