Correct option is (d) all of the mentioned
The explanation is: In order to identify that which key is actually pressed form a particular format of a 3*3 matrix keyboard, we firstly ensure all initially all the keys are open, then we press a key and check that whether the key is actually pressed or not by waiting for a time span of 20mseconds, after this we identify the key that is pressed by masking the bits of the port. In this particular format, we can identify the key that is actually pressed.