 C Programming Code Examples

C > Arrays and Matrices Code Examples

Program to Delete an element from the specified location from Array

Program Add Two Numbers Using Pointer - In program we're going to accept 2 numbers from user using pointer. After accepting Two Numbers we are going to add Two Numbers by using "De-reference Operator" in Pointer.

Implement Interpolation Search algorithm - Implement 'Binary search' using interpolation approach. The Time complexity is "O(log(n))". Implement the Binary Search on sorted array. Then Calculate mid value using 'interpolation'

C Sort Set of Strings in Alphabetical Order - Program to sort set of strings in alphabetical order using strcmp(). Program will accept set of 5 strings & sort them using 'strcmp' library function and "Print the Result" on the screen.

Whether a Path Exists Between two Given - We create a queue for BFS. Mark the current node as visited and enqueue it. It will be used to get all adjacent vertices of a vertex. Get all adjacent vertices of the dequeued vertex s. If

Order of Constructor Call in C++ language - In The C++ programming, When a default or parameterized constructor of a derived class is called, the "Default Constructor" of a base class is called automatically. As you create an

Learn Bitwise Operators in C++ Language - in C++, "bitwise operators" are similar to the Logic operators, but they perform the same logical operations on bits. All data in memory is represented in the "binary form". Variables

Converts Decimal Number to Octal in C++ - In the program, the decimal number is stored in the variable decimalNumber and passed to function decimalToOctal(). Function converts the 'decimal number' passed to its equivalent

Simple Programs Area Of Square Formula - The second power was described in terms of the area of a square, as in the above formula. It led to the use of the term square to mean raising to the "second power". Thus the area