oui

Modern French for "yes," from Old French oïl "yes," at first two words meaning "yes, he," or "yes, they," which gradually came to mean simply "yes." From the Latin phrase hoc ille "yes," literally "this he, so he" (did or said).

The French originally said "yes, I," "yes, you," "yes, we," etc., where the pronoun was the subject of an unexpressed verb easily supplied from the question. [Wright, C.H.C., "A History of French Literature," Haskell House, 1969]

Thus the o is from Latin hoc "this," and the rest of it is from the Latin personal pronoun ille "he" (in Vulgar Latin illi which is also "they"). Old French also had o alone as "yes." Compare Languedoc.