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 c++ program to display pass and fail for three student using static member function

0 Answers  


Tell us about yourself.

47 Answers   ABB, Amazon, Fidelity, Flextronics, Franklin Templeton, HCL, Hexaware, IBM, Impetus, Infosys, Reliance, Rofous, Silgate, Sutherland, TCS, Thomson Reuters, Virtusa, Wipro,


what is opps?why it is use in programming language?

2 Answers   Wipro,


What are virtual classes?

0 Answers  


The IT giant Tirnop has recently crossed a head count of 150000 and earnings of $7 billion. As one of the forerunners in the technology front, Tirnop continues to lead the way in products and services in India. At Tirnop, all programmers are equal in every respect. They receive identical salaries and also write code at the same rate. Suppose 14 such programmers take 14 minutes to write 14 lines of code in total. How long will in take 5 programmers to write 5 lines of code in total ?

6 Answers   TCS,






What is the difference between encapsulation and polymorphism?

0 Answers  


what is function over loading?

5 Answers  


What is encapsulation in simple terms?

0 Answers  


Can we override main method?

0 Answers  


what's the basic's in dot net

0 Answers   informatics,


which are the 4 members functions in c++ objects that can either be declared explicitly by programmer or implementation if nt available.

4 Answers  


how can we design a magic square in c++?or suggest me the basic idea of it.

3 Answers  


Categories