Pencil is preferred for all IELTS exams. You can easily erase and rewrite words. Moreover, scanning tests work best with pencils.