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

  1. #include<graphics.h>
  2. #include<conio.h>
  3.  
  4. main()
  5. {
  6.    int gd = DETECT, gm, max_y;
  7.    char array[100];
  8.    
  9.    initgraph(&gd,&gm,"C:\\TC\\BGI");
  10.  
  11.    max_y = getmaxy();
  12.  
  13.    sprintf(array, "Maximum Y coordinate for current graphics mode and driver is = %d.",max_y);
  14.    outtext(array);
  15.    
  16.    getch();
  17.    closegraph();
  18.    return 0;
  19. }