Here is a challenge for the C++ rookies which I thought might spark their interests or push them further.

The challenge has to do with how each process' memory is layer out.

Given this simple class that we are not allowed to alter.
class Pseudonym
{
private:
    int x;
public:
    Pseudonym()
    {
        x = 100;
    }
    int getX()
    {
        return x;
    }
};

We can see, this class does not allow us to modify X. We can receive the value but the constructor sets in.
Now we have the main.
int main()
{
    Pseudonym s;
    int x = 100;
    //Do not change code above this line
    
    //Your challenge is to modify the value that s.getX() returns.
    //Your code will be added beneath this line
    
    //Do not change code below this line
    if(x != s.getX())
        cout << "congratulations!\nYou completed the challenge.";
    else
        cout << "You failed the challenge.\nTry to modify the value s.getX() returns.";
    
    cin.sync();
    cin.get();
    return 0;
}



Here is the full source.
#include <iostream>

using std::cout;
using std::cin;

//Do not change the class
class Pseudonym
{
private:
    int x;
public:
    Pseudonym()
    {
        x = 100;
    }
    int getX()
    {
        return x;
    }
};
//Do not change the class


int main()
{
    Pseudonym s;
    int x = 100;
    //Do not change code above this line
    
    //Your challenge is to modify the value that s.getX() returns.
    //Your code will be added beneath this line
    
    //Do not change code below this line
    if(x != s.getX())
        cout << "congratulations!\nYou completed the challenge.";
    else
        cout << "You failed the challenge.\nTry to modify the value s.getX() returns.";
    
    cin.sync();
    cin.get();
    return 0;
}

The rules are simple. You can't change any existent code. You can however add your own code, where it writes "Your code will be added beneath this line".
Good luck. If someone would like me to post my solution, I can.