Technical Interview Questions and Answers :: C++
41 / 187
No Discussion on this question yet!
42 / 187
No Discussion on this question yet!
43 / 187
No Discussion on this question yet!
44 / 187
No Discussion on this question yet!
45 / 187
No Discussion on this question yet!
46 / 187
No Discussion on this question yet!
47 / 187
The :: operator links a class name with a member name in order to tell the complier what class the member belongs to. It has another use that is it can allow access to a name in an enclosing scope that is hidden by a local declaration of the same name.
Egname.
Eg:
Void f()
{
int I;
I=10;
………..
……..
}
It may do so by preceding the I with the :: as shown here
Void f()
{
int I;
:: I=10;
……..
……..
}
48 / 187
No Discussion on this question yet!
49 / 187
No Discussion on this question yet!
50 / 187
. Dot operator is used for accessing class members,
-> operator used for accessing pointer in the class
You can check latest and updated C++ Programming Exam Questions and Answers on this page. You can filter the question set by the company's name. Looking for the right answer? Don't worry! You can click on view answer section and check the answer with the explanation. You can discuss the answer in the forum with other users easily. Login with Facebook and save the answer To Reading List right now!
Our site contains top IT companies placement paper and mock test to help the freshers and experienced candidate to get hands on experience on the pattern and type of questions. We have curated all the C++ technical interview questions and answers from previous candidates.