Explain the output of this program?


Warning: Trying to access array offset on false in /home3/indiakep/public_html/wp-content/plugins/dw-question-answer/inc/Template.php on line 8
All QuestionsCategory: Cpp LanguageExplain the output of this program?
Chetan Shidling Staff asked 6 years ago

Code

 

#include<iostream.h>

using namespace std;

class sample { int x; }

int main() {sample obj; obj.x=100; cout<<“x=”<<obj.x<<endl;}

 

Please tell me what is output??