C Programming Code Examples
C > Beginners Lab Assignments Code Examples
Program for computing Area, Volume and Perimeter of Rrectangle using
Program Count No of Lines & Blank Lines -
Open the file and point it to the file pointer fpoint1. Initialize the variables line_count, n_o_c_l, n_o_n_b_l, n_o_b_l, n_e_c to zero. Using while loop read the next line character
Program to Pick and Print a random value -
Picks a random value withing range low-high. Value returned seeds the rand() function. Print version information and exit. First seed the random function. Add line, to the array...
C Programming Writing a Character to file -
In C to write the file, we must open the file in a mode that supports writing. For example, if you open a file in "r" mode, you won't be able to write the file as "r" is read only mode that
C Check the Number is Armstrong number -
C Program to input a number from user and check whether given number is Armstrong number or not. Armstrong number is n-digit number that is equal to the sum of the nth...
C++ Programs to Implement Skew Heap -
Inserting element "into the heap". Deleting "maximum element" from the heap. Merge two heaps. Print the 'maximum element' of the heap. And merge the present heap with
C Code Find Reverse of String by Pointers -
Input a 'string from user', store it in a variable say str. 'Declare another Array' that will store 'reverse of the string', say char reverse[SIZE]. Find Length of the string and store it in some
String Search Algorithm & Short text sizes -
C++ program performs Naive string matching without using any specific library functions. A text and a Pattern is given as input. Pattern is searched for in a text and all 'instances' of the
Add 2 Distances System Using Structures -
A "Structure Distance" containing two data members (inch and feet) is declared to store the distance in inch-feet system. Here, two structure variables d1 and d2 are created to