Somen ranks 18th from the top, which means there are 17 students above him.
Somen ranks 15th from the bottom, which means there are 14 students below him.
The total number of students includes:
- Students above Somen: 17
- Somen himself: 1
- Students below Somen: 14
Total number of students =17+1+14
Total number of students =32
Therefore, 32 students appeared for the examinations.
The correct answer is Option 3: 32.