Q:

moveto function in c using graphics.h

0

moveto function in c using graphics.h

moveto function changes the current position (CP) to (x, y)

Declaration: void moveto(int x, int y);

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

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

main()
{
   int gd = DETECT, gm;
   char msg[100];

   initgraph(&gd, &gm, "C:\\TC\\BGI");

   sprintf(msg, "X = %d, Y = %d",getx(),gety());

   outtext(msg);

   moveto(50, 50);

   sprintf(msg, "X = %d, Y = %d", getx(), gety());

   outtext(msg);

   getch();
   closegraph();
   return 0;
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now