Comments in C language

Monday, September 12th, 2011  »  Posted By  »  Total 0 Comment

Comments are merely program documentation which helps the reader to understand the code. The compiler ignores these comments when it translates the program into executable code. C language uses two different formats of comment 1. Block comment 2. Line comment 1. Block comment: A block comment is used when the comment will span several lines. […]

General Structure of C program

Monday, September 12th, 2011  »  Posted By  »  Total 4 Comments

Basic Structure of a C program contains following sections, Documentation Section Link Section Definition Section Global Declaration Section main() { Declaration Section Executable part } Subprogram section Function 1 Function 2 . . function n The Documentation Section consists of a set of comment lines giving the name of the program and other details. The […]

Binary Search

Binary Search Monday, August 15th, 2011  »  Posted By  »  Total 2 Comments

A binary search program locates the position of an item in a sorted array. Logic: The Binary search starts by testing the element at the middle of the array. Let us consider an array ‘a’ with all elements arranged in ascending order. Let low and high are the lower and upper indices of the array ‘a’, respectively. We want to search an […]

Insertion sort in C program

Insertion sort in C program Thursday, December 4th, 2008  »  Posted By  »  Total 189 Comments

Here is the program to sort the given integer in ascending order using insertion sort method. Please find the pictorial tutor of the insertion sorting. Logic : Here, sorting takes place by inserting a particular element at the appropriate position, that’s why the name-  insertion sorting. In the First iteration, second element A[1] is compared […]

Bubble sort program in C

Bubble sort Image Demo Thursday, December 4th, 2008  »  Posted By  »  Total 63 Comments

Here is the program to sort the given integer in ascending order using bubble sort method. Please find the pictorial tutor of the bubble sorting. Logic :  The entered integers are stored in the array A. Here, to sort the data in ascending order, any number is compared with the next numbers for orderliness. i.e. […]

Mouse programming in C

Thursday, November 20th, 2008  »  Posted By  »  Total 3 Comments

Mouse can be used in text mode as well as in graphics mode. Usually it is used in graphics mode. Hence we must first change over to graphics mode. In our program the function initgraph() is responsible for switching the mode from text to graphics .DETECT is a macro defined in ‘graphics.h’. It requests initgraph() […]

Turbo C graphics programming

Turbo C graphics programming Thursday, November 20th, 2008  »  Posted By  »  Total 85 Comments

To start with graphics programming, Turbo C is a good choice. Even though DOS has its own limitations,  it is having a large number of  useful functions and is easy to program. To implement graphics algorithms,  To give graphical display of statistics, To view signals from any source, we can use C graphics. Here  is  […]

Sorting of numbers

Tuesday, November 4th, 2008  »  Posted By  »  Total 1 Comment

Sorting means arranging a set of data in some order. There are different methods that are used to sort the data in ascending order. Some of the  methods are Selection sort Bubble sort Insertion sort 1. Selection sort Here, to sort the data in ascending order, the 0th element is compared with all other elements. […]

Question and Answer
C/C++ Unix & Linux Wordpress
Source codes
C C++ Java

Free email signup

Email: