getmaxx and getmaxy functions in c

Declarations :-

int getmaxx();
int getmaxy();

getmaxx function returns the maximum X coordinate for current graphics mode and driver.
getmaxy function returns the maximum Y coordinate for current graphics mode and driver.

C programming code

#include<graphics.h>
#include<conio.h>
#include<stdio.h>
 
main()
{
   int gd = DETECT, gm, maxx, maxy;
   char a[100];
 
   initgraph(&gd,&gm,"C:\\TC\\BGI");
 
   maxx = getmaxx();
   maxy = getmaxy();
 
   sprintf(a,"Maximum X and Y coordinates for current graphics mode and driver are %d and %d respectively.",maxx,maxy);
   outtext(a);
 
   getch();
   closegraph();
   return 0;
}
randomness