A Wikibookian suggests that this book or chapter be merged into C Programming/Further math.Please discuss whether or not this merge should happen on the discussion page. |

**cimag** is a complex function in c programming. As complex numbers contain two parts, one real part and one imaginary part, this function is used to declare the imaginary part of a complex number. For example, let 'M' be any complex number which can be represented using c functions as follows:

- M = creal(M) + cimag(M) * i
- where creal(M) = real part of M.
- The function returns the imaginary part of the complex no.