Since you're using a C++ compiler, you can undo a few C habits (earlier the better!)
#include <iostream> // for std::cout and std::cin
using namespace std::cin;
using namespace std::cout;
using namespace std::endl;
Instead of printf (and the issue that john pointed out regarding C style strings), use:
cout << numOfQuestions << "\t" << correctAnswers << endl;
You can read about cout here