eq=y''[x]+y[x]==0

DSolve[{eq,y[0]==c,y'[0]==2},y,x]

Last[Last[Last[Last[%]]]]

f[x_,c_]=%

Plot[Table[f[x,c],{c,1,5,1}],{x,0,6}]

Plot[Table[f[x,c],{c,{1,3,4}}],{x,0,6}]