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. [...]
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 [...]
Monday, August 15th, 2011 »
Posted By chitra » 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 [...]
Thursday, December 4th, 2008 »
Posted By Ranjith » Total 182 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 [...]
Thursday, December 4th, 2008 »
Posted By Ranjith » Total 60 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 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() [...]
Thursday, November 20th, 2008 »
Posted By Ranjith » Total 81 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 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. [...]
This is the one stop educational site for all Electronic and Computer students. If you want to learn something new then we are here to help. We work on Microcontroller projects, Basic Electronics, Digital electronics, Computer projects and also in basic c/c++ programs.
#Home #Sitemap #Resources #Terms of Use
Copyright©2012 electrofriends.com All Rights Reserved
Contact:info@electrofriends.com