Linerel function draws a line from the current position(CP) to a point that is a relative distance (x, y) from the CP, then advances the CP by (x, y). You can use getx and gety to find the current position.
C programming code for linerel
int gd = DETECT, gm;
initgraph(&gd, &gm, "C:\\TC\\BGI");