E-Fill Electric Interview Question

How UART work and write a small programme