1.where the images are stored in database or response of attended questions with image (table name )
2.Where the images are stored in moodle file.
It is quite complex. The files table contains a pointer to where the files are stored. The files are physically stored with the name hashed, i.e. an incomprehensible list of apparently random letters and numbers e.g. 5b1a8f4657a5d4b2ca3ee04a986947aea7294c3e
This page may help explain further
https://docs.moodle.org/dev/File_API_internals#File_storage_on_disk
1.if files are stored in a directory , then which directory contains the files.
2.is there any way to get directory where the images are stored.
Yes, you need to look up the name of the files in the files table which will give you the location of the folder where the file is stored (but the file will have an unrecognisable named derived from a hash), it is complex.
What question type are you referring to?
multiple choice question......
multiple choice is the question type..........
I don't understand the original question, there is no built in connection between images and answers in the multiple choice questions, can you explain further (perhaps with a screen shot)