Let x = boys in class and y=girls in class = 20 (given).
\(\text{Average} = \frac{\text{Sum of age}}{\text{No. of students}}\)
Given Avg. of class is \(=\frac{(20x+15(20))}{(20+x)}=18\)
On solving, we get
\(x=30\)
No of boys in class is 30.. So the correct option is (A)