Wednesday, October 13, 2010

Graphics in C Language Tutorial

,


C and C++ Very Useful Language for Creating Application and programs. It provide a platform for developing a application with many functionality. But we know that mostly users attract Interface design. Design of application gives easy to use for users, he can user any application easily by UI. All programmings language can easily implement with graphic eg: C,C++,PHP,.net etc. Here we are learning about Graphic in C language with example, graphics.h library is used for create GUI (Graphic User Interface).
Learn with below example :


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


void main()
{
  int gd=DETECT,gm;
  clrscr();
  initgraph(&gd,&gm,"..\bgi");
  putpixel(100,100,WHITE);
  line(50,50,150,150);
  rectangle(200,200,400,400);
  closegraph();
  getch();
}

3 comments:

  1. It was nice . You should have keep doing that. They are really helpful & it was a nice idea indeed.
    .net obfuscator

    ReplyDelete
  2. C is a high level programming language and invented by Danis Richie in 1972. C was invent during the working in Unix operating system .the code of Unix operating system is code in C language.
    Web Development Companies in Jaipur

    ReplyDelete