Clearly, according to the given conditions, there are 15 boys to the left of A, as well as to the right of C. Also, B lies between A and C such that there are 3 boys between A and B and 4 boys between B and C. So, number of boys in the row= (15 + 1 + 3 + 1 + 4 + 1+ 15) = 40.