Quick Contact

✉
fahimkhan20148@gmail.com
📱
+971 507 286 133
Back to Notes
August 28, 2026
cmathtypes

Complex Numbers in C

Complex numbers represent mathematical quantities with real and imaginary components, along with arithmetic and manipulation functions.

#include <complex.h>

float complex point = 1.0 + 2.0*I;
double complex point2 = 1.0 + 3.0*I;

Also, there are a few functions in the <complex.h> headers; the rest just let us work with complex numbers.

Again, complex is an optional feature of C11, so check __STDC_NO_COMPLEX__.