C Programming Code Examples
C > Hardware Interaction Through C Code Examples
Program for setting cursor size
Implementation for Top-Down Splay Tree -
Finding the smallest item in the tree. Not the most efficient implementation ('two passes'), but has correct "amortized behavior". A good alternative is to first call Find with parameter
Connected Components of an UnDirected -
Program to find the connected components of the "undirected graph". This can be done using depth first search. Implementation of "Kosaraju's algorithm" to print all SCCs. Fills
C Read a Grade and Display the Equivalent -
C language program take the letter as input and store it in the variable grade. Convert the input letter into its uppercase using function toupper(). Using switch statement, verify the
Program Create the Prufer Code for a Tree -
The Time complexity to generate this code is 'O(v*e)'. This algorithm takes the input of the number of vertexes for the tree. Then it takes the input if "Vertex Pairs" which have an edge
Code Extract Last Two Gigits of the year -
This c language program takes any year as input and prints its last two digits. Take any year as input. Divide the input by 100 and obtain its remainder. The remainder got is
Implementing Circular Doubly Linked List -
'Memory allocated' for node dynamically and inserts element at beginning. Inserts elemnet at last. Inserts element at position and delete node at particular position. Update value of a
Get Lowest order or first set bit of number -
C Program Lowest order or first set bit of any number is the first bit set starting from left to right. Lowest order set bit of any odd number is 0 since first bit of any odd number is always
C++ language Declare a Variable as Static -
In the C++ Programming, The static keyword allows a variable to maintain its value among different function calls. If the value of a static variable changes when the variable has been