Insertion sort in C program

Insertion Sort Demo Thursday, December 4th, 2008  »  Posted By  »  Total 154 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 50 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 70 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  [...]

8051 Microcontroller port programming

1 Wednesday, November 19th, 2008  »  Posted By  »  Total 71 Comments

There are four ports P0, P1, P2  and  P3 each  use  8 pins,  making  them 8-bit  ports. All the ports upon  RESET are configured as output, ready to be used as output ports. To use any of these ports as an input port, it must be programmed. Pin configuration of 8051/8031 microcontroller. Port 0: Port [...]

8051/8951 microcontroller Instruction Set

8051/8951 microcontroller Instruction Set Wednesday, November 19th, 2008  »  Posted By  »  Total 19 Comments

The instruction set is divided in to 5 categories. They are as follows: Arithmetic instructions Logic instructions. Data transfer instructions. Boolean variable manipulation instruction. Program and machine control instruction. We have listed all the instructions of  microcontroller with description, Bytes, Cycle. Each instructions are explained in the next pages one by one. All instructions are [...]

Interfacing an LCD to the 8951 Microcontroller

1 Wednesday, November 19th, 2008  »  Posted By  »  Total 17 Comments

LCD pin descriptions: The LCD discussed in this section has 14 pins. The function of each pin is given in table. Vcc, Vss, and VEE: While Vcc and Vss  provide  +5V and ground, respectively, VEE  is used for controlling LCD contrast. RS – register select: There are two very important registers inside the LCD. The [...]

Stepper motor control board

1 Monday, November 17th, 2008  »  Posted By  »  Total 31 Comments

This project is actually an educational kit. One can study the full operation of unipolar type stepper motor using this board. As it is micro controller based it can be programmable also and one can learn micro controller interfacing with LEDs, key board and stepper motor. Thus single board serves the purpose of learning stepper [...]

DPSK Modulation and Demodulation

DPSK Modulation and Demodulation Wednesday, November 5th, 2008  »  Posted By  »  Total 10 Comments

Differential phase shift keying (DPSK), a common form of phase modulation conveys data by changing the phase of carrier wave. In Phase shift keying, High state contains only one cycle but DPSK contains one and half cycle. Figure illustrates PSK and DPSK Modulated signal by 10101110 pulse sequence

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