In the below code i can't understand highlighted code...
using namespace std;
class B : public A
B(const A &a): A(a) //explain this line please
B b = a;
That's using an initializer list to use a particular constructor of A when initializing the A portion of a B.
if i want to change the value of data of object a through object B how it is possible???
You mean change the value of a member B inherits from A? You can just access it like a normal member (assuming access is allowed).