You are here

getmaxy function in c

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

Declaration: int getmaxy();

C program for getmaxy

#include<graphics.h>
#include<conio.h>

main()
{
   int gd = DETECT, gm, max_y;
   char array[100];
   
   initgraph(&gd,&gm,"C:\\TC\\BGI");

   max_y = getmaxy();

   sprintf(array, "Maximum Y coordinate for current graphics mode and driver is = %d.",max_y);
   outtext(array);
   
   getch();
   closegraph();
   return 0;
}

Share this