Coding Beyond Technology..

Monday, 19 September 2016

Whats the Output ??

#include <iostream>

using namespace std;

class Test{

    int i; // data member

    public :

        Test(){
            cout<<"\nYou Entered Test Class.";

            i = 10;

            showValue(); // Member function
        }

        void showValue(){
            cout<<"\n i = "<<i;
        }

}obj;

main(){}


Q. Will it be an error  ? If yes why ? If no why ?

0 comments:

Post a Comment

Popular Posts

Recent Posts

Unordered List

Text Widget

Powered by Blogger.