You are here

getdrivername function

getdrivername function returns a pointer to the current graphics driver.

C program for getdrivername

  1. #include<graphics.h>
  2. #include<conio.h>
  3.  
  4. main()
  5. {
  6.    int gd = DETECT, gm;
  7.  
  8.    char *drivername;
  9.  
  10.    initgraph(&gd, &gm, "C:\\TC\\BGI");
  11.  
  12.    drivername = getdrivername();
  13.    outtextxy(200, 200, drivername);
  14.  
  15.    getch();
  16.    closegraph();
  17.    return 0;
  18. }