Adjectives

(s)ad hocoften improvised or impromptu“an ad hoc committee meeting”
(s)ad hocfor or concerned with one specific purpose“a coordinated policy instead of ad hoc decisions”

Adverbs

(r)ad hocfor one specific case“they were appointed ad hoc”