Let the number of boys in the class be \(b\).
According to the question,
\(\frac 23 b = 18\)
\(b = 24\)
Let the total number of students in the class be \(t\).
According to the question,
\(\frac 23t = 24\)
\(t = 36\)
Total number of students in class \(= 36\)
Number of girls in the class \(= 36 - 24 = 12\)
So, the correct option is (B) : 12.

A, B, C, D, E, F and G are travelling in three different vehicles: Swift, Creta, and Nexon. There are at least two passengers in each vehicle. Among them, only two are male. There are two engineers, two doctors and three teachers.
(i) C is a lady doctor and she does not travel with A and F, who are sisters.
(ii) B, a male engineer, travels with only G, a teacher, in a Swift.
(iii) D is a male doctor.
(iv) Two persons belonging to the same profession do not travel in the same vehicle.
(v) A is not an engineer and travels in a Creta.
(vi) The pair of sisters A and F travels in the same vehicle.
What is the profession of F?