C++ Programming :: OOPS Concepts - Discussion
5 / 14
Which two entities(reading from left to right) are connected by the dot operator(or class member access operator)?
AA class member and a class object
BA class object and a class
CA class and a member of that class
DA class object and a member of that class
Show Explanation
{
private:
int data;
public:
void function()
{
data = 10;
}
};
int main()
{
Test t1;
}
Test is a class and t1 is an object of class Test. We can access members of class Test using object t1. So the function 'function()' can be accessed as t1.function().
Asked In ::
class Test
{
private:
int data;
public:
void function()
{
data = 10;
}
};
int main()
{
Test t1;
}
Test is a class and t1 is an object of class Test. We can access members of class Test using object t1. So the function 'function()' can be accessed as t1.function().
Read Full Answer
Report Error
Please Login First Click Here