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

What is persistence in oop?

0 Answers  


Name an advantage of array over linked list?

24 Answers   GML, IBM, Software Solutions,


What is the difference between encapsulation and polymorphism?

0 Answers  


Can abstract class have normal methods?

0 Answers  


which feature are not hold visual basic of oop?

0 Answers   Ignou,


Contrast OOP and SOA. What are tenets of each?

1 Answers   Siebel Systems, Wipro,


write a short note on Overloading of Binary Operator?

2 Answers  


What are the four main oops concepts?

1 Answers  


What are the advantages of polymorphism?

0 Answers  


define oops concept with example

1 Answers   Cap Gemini,


WRITE A SIMPLE C++ PROGRAM TO SWAP TWO NOS WITHOUT USING TEMP

2 Answers  


what is polymorpsim? what are its types?

8 Answers  


Categories