Step 1: Calculate total number of students in IIT Kanpur.
We are given that the total number of students in all IITs combined is 4500. The percentage of students in IIT Kanpur is 21%, so we can calculate the total number of students in IIT Kanpur:
\[
\text{Number of students in IIT Kanpur} = 4500 \times 0.21 = 945
\]
Step 2: Calculate the number of female students in IIT Kanpur.
The male to female ratio in IIT Kanpur is 7:5. This means for every 12 students, 5 are female. So, the number of female students in IIT Kanpur can be calculated as:
\[
\text{Female students in IIT Kanpur} = \frac{5}{12} \times 945 = 393.75 \approx 394
\]
Step 3: Calculate the percentage of female students in IIT Kanpur.
The number of female students in IIT Kanpur is 394, and the total number of students in IIT Kanpur is 945. To find the percentage of female students, we use the formula:
\[
\text{Percentage of female students in IIT Kanpur} = \frac{394}{945} \times 100 \approx 41.67%
\]
Step 4: Conclusion.
Thus, the number of female students in IIT Kanpur is approximately 42% of the total number of students in it. Therefore, the correct answer is (D).