wherex function return current horizontal cursor position.
Declaration :- int wherex();
#include<stdio.h> #include<conio.h> main() { int x; printf("Hello"); x = wherex(); printf("Horizontal cursor position from where this text appears = %d\n",x); getch(); return 0; }