Two cylinders A and B fitted with pistons contain equal amounts of an ideal diatomic gas at 300K. The piston of A is free to move, while that B is held fixed. The same amount of heat is given to the gas in each cylinder. If the rise in temperature of the gas in A is 30K, then the rise in temperature of the gas in B is
A. (a) 30K
B. (b) 18K
C. (c) 50K
D. (d) 42K