We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Hiring developers?
  1. Prepare
  2. C++
  3. Classes
  4. Classes and Objects
  5. Discussions

Classes and Objects

Problem
Submissions
Leaderboard
Discussions

    You are viewing a single comment's thread. Return to all comments →

  • legendcoders
    4 months ago+ 0 comments

    include

    include

    include

    include

    include

    using namespace std; class student{ private: int marks,b,gre=0; public: void sum(int n) {b=n; int ar[b]; for(int i=0;i>marks; ar[i]+=marks; } } for(int i=0;i } cout<>n; obj.sum(n); return 0; }

    -2|
    Permalink
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy