Answer Posted / sweety
Yes,Because everything is inside the class & accesses
methods and variables by only using objects.
as well as the main function is always resides within the
class i.e.similar name given to your file.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is destructor in oop?
What are the 4 main oop principles?
String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
Can bst contain duplicates?
What is class in oop with example?
Why is polymorphism important in oop?
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
What is new keyword in oops?
What is ambiguity in inheritance?
What is the difference between procedural programming and oops?
Which type does string inherit from?
#include
write string class as your own class in java without using any built-in function
• What are the desirable attributes for memory managment?