fork download
  1. #include <iostream>
  2. using namespace std;
  3. class programming
  4. {
  5. public: void output(); //function declaration
  6. };
  7. void programming::output()
  8. {
  9. cout << "Function defined outside the class.\n";
  10. cout<<"rollNo is 19_553";
  11. }
  12. int main()
  13. {
  14. programming x;
  15. x.output();
  16. return 0;
  17. }
Success #stdin #stdout 0s 4868KB
stdin
Standard input is empty
stdout
Function defined outside the class.
rollNo is 19_553