Pls...could any one tell me that whether we can access the
public data memeber of a class from another class with in
the same program.
Awaiting for your response Thanku

Answers were Sorted based on User's Feedback



Pls...could any one tell me that whether we can access the public data memeber of a class from ano..

Answer / naveen

yes, by using inheritance we can access public members of
class in other class

Is This Answer Correct ?    8 Yes 0 No

Pls...could any one tell me that whether we can access the public data memeber of a class from ano..

Answer / pramod

If it's about the data accessing, whether public or private
... you can use friend function.This friend function can be
member of 2nd class and friend for the 1st class.

Is This Answer Correct ?    6 Yes 0 No

Pls...could any one tell me that whether we can access the public data memeber of a class from ano..

Answer / saurabh

You can access by just creating the object of first class
and then using this object to access public member in
second class.

Is This Answer Correct ?    4 Yes 1 No

Pls...could any one tell me that whether we can access the public data memeber of a class from ano..

Answer / poorna chandar rao

yes accesses the public member of data of another class by
using Extend from another class

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More OOPS Interview Questions

IN PROGRAMING LANGAUGE A C++ IS PURELY OBJECT ORIENTED OR NOT?

2 Answers  


Given two strings like x=?hello? and y=?open?, remove any character from string x which is also used in string y, thus making the result x=?hll?.

13 Answers   IBM,


how to find the correct email address format by using the programe?

1 Answers   Accenture,


Which method cannot be overridden?

0 Answers  


What are the different forms of polymorphism??

8 Answers   Mantaq, NUC, PCS,






what are the uses of C++

1 Answers  


Why is polymorphism important in oop?

0 Answers  


what is the difference between class and structure in C++?

9 Answers   Aspire, IBS, TCS,


why c++ is called OOPS? waht is inherutance? what is compiler?

5 Answers  


What is abstraction in oop?

0 Answers  


write a programe to calculate the simple intrest and compund intrest using by function overlading

0 Answers  


What is an example of genetic polymorphism?

0 Answers  


Categories