For a linear function f(x)=ax+c, where a and c are constants, if f(k)=d, which of the following expresses c in terms of a, k, and d?
c=d−ak
c=ak−d
c=d+ak
c=akd