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
Answer Posted / 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 |
Post New Answer View All Answers
What is polymorphism what is it for and how is it used?
What is destructor example?
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
What is the real time example of inheritance?
How Do you Code Composition and Aggregation in C++ ?
what are the different types of qualifier in java?
Is enum a class?
when to use 'mutable' keyword and when to use 'const cast' in c++
How do you define social class?
What is abstraction encapsulation?
What are the benefits of interface?
What is coupling in oop?
Why is there no multiple inheritance?
What is object and class in oops?
Can static class have constructor?