Which one is more efficient: a heater or a cooler? I know that in an ideal case, both a heater and a cooler would be Carnot engines. Assuming that the magnitude of temperature difference across them is the same, they would have the same efficiency. 
In a real case (taking the present heating and cooling machinery into mind), is heating a room more efficient than cooling it? A more precise way of asking the same question would be if the temperature of a room has to be changed by 10 degrees, which one of the following would consume more energy: a heater or a cooler
 A: 
I know that in an ideal case, both a heater and a cooler would be
  Carnot engines. Assuming that the magnitude of temperature difference
  across them is the same, they would have the same efficiency.

A Carnot cooler (air conditioner/refrigerator) and heater (heat pump) do not have the same Coefficient of Performance (COP), the term used to describe efficiency. For any air conditioner and heat pump the COP equals the desired heat transfer divided by the work required to perform the transfer. The COP’s are
$$COP_{air conditioner}=\frac{Q_L}{W}$$
$$COP_{heat pump}=\frac{Q_H}{W}$$
Since, thermodynamically, a heat pump can reverse itself and become an air conditioner, the work input $W$ is the same for both. And, since $Q_L$<$Q_H$, the COP for the heat pump will always be greater. The Carnot COP's are
$$COP_{air conditioner}=\frac{T_L}{(T_{H}-T_L)}$$
$$COP_{heat pump}=\frac{T_H}{(T_{H}-T_L)}$$

In a real case (taking the present heating and cooling machinery into
  mind), is heating a room more efficient than cooling it?

To make the comparison it is only necessary to compare the work required by the heater and cooler to add and remove, respectively, the same amount of heat to or from the room, rather than make the comparison in terms of temperature differences.
If by "present heating and cooling machinery" you mean heat pumps and air conditioners in general, then as I already indicated above the heat pump would be more efficient since it has a higher COP. A higher COP means more heat transferred for the same work input.
If you mean to compare air conditioners to, say, electric resistance type heating equipment, air conditioners would still be more "efficient".  That's because all air conditioners have COP's greater than one, whereas the equivalent "COP" of resistance heaters would be, by definition, equal to 1.
For example,  the typical range of COP's for an air air conditioner is the range of 2-4. Let's call it 2. That means for every 2 Joules of heat transferred out of the room it would require only 1 Joule of electrical energy input. For resistive heating, on the other hand, every 2 Joules of heat transferred into the room would require 2 Joules of electrical energy input.
I should add, however, although heat pumps are more efficient than electric heaters for heating purposes, they may not have sufficient capacity in cold climates. That's one of the reasons you find them popular for seasonal heating in primarily warmer climates, such as the southern US.
Hope this helps.
A: I'll neglect the changing temperature of the room and instead talk about a transfer of a fixed amount of heat $Q$, just because it's easier to talk about. 
A heater is easy to construct. You just need to push electricity through a resistor and all the energy will be dissipated into heat, so to give heat $Q$ to a room you just use energy $Q$, always. 
A cooler is a bit different. You need an engine running in reverse. Imagine an AC connecting the room to the outside. If the room temperature is $T$ and external $T_0>T$, to pull heat $Q$ from the room, from the Carnot engine we need to do at least work $W$ such that (remember that we're giving $Q+W$ to the environment)
$$\frac{W}{Q+W}=1-\frac{T}{T_0}$$
$$W=\frac{Q}{\frac{1}{1-\frac{T}{T_0}}-1}$$
This might be greater or smaller than $Q$ depending on the temperatures. If they are really close to each other (like they usually are) $W$ tends to 0, while if one is much larger than the other, $W$ gets very large. 
