In a C program, first step is to initialize the graphics drivers on the computer. This is done using the initgraph() method provided in graphics.h library. In the next few pages we will discuss graphics.h library in more details. Important functions in graphic.h library will be discussed in details and samples programs will be provided to show the power of C programming language especially for graphic programming developing graphical user interfaces.
C programs are executed in a sequence, but we can control the execution of program by using any control mechanism by which we can compare things and come to a decision. This involves using some operations called Relational Operators, conditional statements called if-else and loops. We have fundamental operators to compare two values.
A function is a block of code that has a name and it has a property that it is reusable i.e. it can be executed from as many different points in a C Program as required. Function groups a number of program statements into a unit and gives it a name. This unit can be invoked from other parts of a program. A computer program cannot handle all the tasks by it self. Instead its requests other program like entities – called functions in C – to get its tasks done. A function is a self contained block of statements that perform a coherent task of same kind.
This is an automated software system written in C programming language for Bank Management which can handle accounts for customers. It uses files to handle the daily transactions, account management and user management. Its not a complete accounting software just like implemented in the banks, but still it can manage the accounts of the customers using the files at back end. It has a nice graphical layout written in C Language.
LibGD is an open source Graphics library for the creation of images dynamically by programmers. GD is written in C, and “wrappers” are available for Perl, PHP and other languages. GD is commonly used to generate charts, graphics, thumbnails, and most anything else, on the fly. While not restricted to use on the web, the most common applications of GD involve website development. It allows to quickly draw images complete with lines, arcs, text, multiple colors, cut and paste from other images, and flood fills, and write out the result as a PNG or JPEG file.
The SFL (Standard Function Library) is an open source portable function library for C/C++ programs. Written by iMatix, the SFL provides about 450 functions for compression, encryption, encoding, datatype conversion and formatting, dates, times, calendars, internet programming (MIME, CGI) and many more.
Ubiqx is a collection of ANSI C compatible modules for implementing linked lists, binary trees, caching and spare arrays. The goal of the ubiqx project is to develop a set of clean, small, re-usable code modules which implement fundamental constructs and mechanisms, and to make them available under the terms of the GNU Library General Public License (LGPL).