First we need the balanced equation:
2C + O2 --> 2CO
This is a limiting reactant problem, so after doing stoichiometry, the reactant that produces the least amount of product will be the answer.
(5.23g C)/(12.01g/mol C)= (.435mol C)(2mol CO/2mol C) = (.435mol CO)(28.01g/mol CO) = 12.2g CO
(1.55g O2)/(32.0g/mol O2) = (.048mol O2)(2mol CO/1mol O2)= (.097mol CO)(28.01g/mol CO) = 2.71g CO
The maximum amount of CO produced is 2.71g since oxygen is the limiting reactant