To determine the amount of a certain element in a compound, we use the ratio of the elements from the compound. We calculate is follows:
45.0 g CCl4 ( 1 mol CCl4 / 153.82 g CCl4 ) ( 1 mol C / 1 mol CCl4 ) ( 12.01 g C / 1 mol C ) = 3.5135 g carbon present
Hope this answers the question. Have a nice day.