Johnny Carson joined the Navy in 1943, according to Showbiz Cheat Sheet, when he was 18 years old, a couple of years after the attack on Pearl Harbor. During his three-year service, he reached the rank of Ensign, the lowest officers’ rank.
Ed McMahon, who was a couple of years older than his eventual boss, also enlisted in 1943, according to the Defense Department, and served for three years, though he remained in the reserves for two more decades and was even called back up to duty during the Korean War. He retired as a Colonel, a few steps up the ladder from Carson’s Ensign (albeit in the Marine Corps).
Though he outranked Carson considerably, the difference in rank played no role in their relationship. Carson never saluted the higher-ranking officer, nor did the senior officer give any commands to the junior. That’s because the two men were likely nowhere near each other at any point during their overlapping military careers, according to Snopes, to say nothing of the fact that their jobs didn’t overlap and they were in different divisions. The two men didn’t even meet until 1958, according to another Showbiz Cheat Sheet report.