When speaking to one, sir or ma'am is appropriate. In the CF it's not usual to address an officer by rank alone, e.g. you would not normally say "Good morning, Captain". When starting a conversation with an officer if would be normal to say something like "Captain Bloggins, can I talk to you...