You can use funtcion time() defined in <ctime>. Use this function with a NULL argument (or 0) to return the current time in seconds.
Here's a little trick that could check for the elapsed time ( its not 100% accurate in timing though ):
This will stop asking the questions within the loop after 20 seconds , which is what you want , but she can take her time on the last question though.
bool loop = true; // loop variable
int current = time(0); // get time in seconds
int finish = current + 20; // specify deadline wich is current
// time plus 20 seconds
current = time(0); // update current time
// ask questions and investigate answers here
if(finish < current)
loop = false;
// if deadline is less than current time ; it means the
// time's out and we should terminate the "questions loop"
hope this helps