C Programming Code Examples
C > Small Programs Code Examples
Convert IP address to its base10 form
C++ Programming Copy Strings & Display -
To copy string in C++ language, enter a string to "make copy" to another variable say str2 of same type using Function strcpy() and display the copied string on the screen as shown here
C Code Function Solve the Tower of Hanoi -
C Program code uses Recursive Function and solves the tower of hanoi. Tower of hanoi is a mathematical puzzle. It consists of threerods, and a number of disks of different sizes which
C++ Using Simple Hierarchical Inheritance -
In C++ Language, The relationships of objects or classes through "Inheritance" give rise to a hierarchy. In hierarchical inheritance a single class serves as a superclass for more than one
C Program Filter text with a stop word list -
Read stoplist into binary tree, expects one entry per line. Split string into tokens, return token array. Make sure, copy string to a safe place. Always keep last entry null terminated.
Program Represents Graph by Linked List -
Algorithm represents a 'graph' using Linked list. The time complexity of this algorithm is "O(e)". This algorithm takes the input of the number of vertex and edges. Take the input
C++ Language Break Continue Statement -
We can use "break" statement inside loops to terminate a 'loop & exit' it. In above example loop execution 'continues' until either n>=20 or entered score is negative. This statement
C Program to Simulate a Simple Calculator -
This C Program simulates a simple calculator. Program performs arithmatic operations like addtion, subraction, multiplication & division. Assume that the two numbers a&b are given.
C++ language has many built-in operators -
Operator is a symbol that is used to perform "mathematical" or "logical" manipulations. +, -, *, /, %, Addition, Subtraction, Division and Multiplication, Modulus, ++, -- Increment and