You can also receive Free Email Updates:

 

We Offers

  • Basics of C Programming
  • Basics of C Graphics Programming
  • Simple and Effective tutorials
  • No. of Practical Examples
  • Online Support for User's Problems.

First Program in C Graphics


                                                     Before start first program of C Graphics we need to understand its basic structure to write program. In C graphics basic unit is Pixel. and it has 640 column and 480 rows. 


#include<stdio.h>
#include<graphics.h>

void main()
{
       int gd=DETECT,gm;
       initgraph(&gd, &gm, "C://TC//BGI");
       line(0,0,200,200);
       getch();
       closegraph();
}
Brief Introduction of program.


6 comments:

Anonymous said...

thanx it is very useful to understand structure of c graphics. Nice job. Keep it up...

Anonymous said...

it is not running in borland c++ 5.02 version
can u help me?

ProgammingCampus said...

i think you have window 7 as operation system???
if you are using window 7 than i suggest you that you please use emulated turbo c for runnning graphics program.

ProgammingCampus said...

To run graphics program in window 7 just visit this page Click Here.

Anonymous said...

nice work bro, keep going...,.,

ProgammingCampus said...

Thanks for your feedback friend.

Post a Comment