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


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More OOPS Interview Questions

Write A Program using Single and Multiple Inheritance.

1 Answers  


What is abstraction?

9 Answers  


What is the oops and benefits of oops programming?

0 Answers  


What is multilevel inheritance in oop?

0 Answers  


What do we mean by a hidden argument in a function?

1 Answers   TCL,






How can we use the preprocessor #if and #elseif.

2 Answers  


What is object in oop with example?

0 Answers  


Why polymorphism is used in oops?

0 Answers  


What is extreme programming?

2 Answers  


Hi All, I am new to programming and want to know how can i write a code to take input of 2 numbers from user and swap it without using a temp variable?

2 Answers   NIIT,


What is the highest level of cohesion?

0 Answers  


Which is better struts or spring?

0 Answers  


Categories