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. Structs
  5. Discussions

Structs

Problem
Submissions
Leaderboard
Discussions

Sort 215 Discussions, By:

recency

Please Login in order to post a comment

  • aadinew7
    2 months ago+ 0 comments

    Here are the solution of HackerRank Structs in C++ Solution

    Join Telegram Group for Updates Click Here

    0|
    Permalink
  • hsandip640
    3 months ago+ 0 comments

    Here's Tee Simple C++ Solution :

    include

    include

    include

    include

    include

    using namespace std;

    struct Student{ int age; string first_name; string last_name; int standard;

    };

    int main() { Student st;

    cin >> st.age >> st.first_name >> st.last_name >> st.standard;
    cout << st.age << " " << st.first_name << " " << st.last_name << " " << st.standard;
    
    return 0;
    

    }

    0|
    Permalink
  • gouravsingh965
    4 months ago+ 0 comments

    int a; int b;

    string s1,s2 ; cin >>a; cin >> s1; cin >>s2; cin >>b; cout << a <<" "<

    0|
    Permalink
  • iamsurajmandal
    4 months ago+ 0 comments
    struct Student {
        int age, standardOfStudent;
        string first_name, last_name;
    };
    int main() {
        /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 
        Student s;
        cin >> s.age  >> s.first_name >> s.last_name >> s.standardOfStudent;
        cout << s.age  <<" "<< s.first_name <<" "<< s.last_name << " "<<s.standardOfStudent;
        return 0;
    }
    
    0|
    Permalink
  • SYCOA134
    4 months ago+ 0 comments

    struct student{ int age; string first_name; string last_name; int standard; };

    int main() { student stu;

    cin >> stu.age >> stu.first_name >> stu.last_name >> stu.standard;
    cout << stu.age << " " << stu.first_name << " " << stu.last_name << " " <<    stu.standard;
    
    return 0;
    

    }

    0|
    Permalink
Load more conversations

Need Help?


View top submissions
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy