An NDB bears 279 degrees relative from an aircraft heading 209 degrees (C).
With deviation of -7 degrees and variation of 18E. What is the bearing of the aircraft from the NDB.
Compass heading 209 - deviation 7 = magnetic heading 202.
Relative bearing 279 + 202 = 481. Subtract 360 to get QDM 121.
Add 180 to get QDR = 301.
For plotting on a chart correct for variation at the aircraft (not at the NDB), ie line to plot = 301M+18E = 319T.
So 301M or 319T depending on what you want to use it for.