# C Programming Code Examples

## C > Arrays and Matrices Code Examples

Page 1 Page 2 Page 3 Page 4

Page 1 Page 2 Page 3 Page 4

C++ Find Maximum & Minimum Numbers

Program should display all 'random elements' of array and minimum and maximum number in array on screen. Array size is fixed to 100 to change the size just change the 'Value of size'

Pointer Simple Program Pass by Reference

C++ Language program sample which passes a "Reference" to a Function and Function has a 'pointer' as argument. Keep the return type void & display result in main body. Apply any

C++ Class Program to Find Prime Number

A 'prime number' is a natural number greater than 1 that has no positive divisors other than 1 and itself. The C++ Programming Language allows you to separate program-specific data

How to Call Overridden Functions in C++

As we have seen above that when we make the 'call to function' (involved in overriding), the child class function (overriding function) gets called. what if you want to call the C++

We will see 2 C programs to calculate the sum of natural numbers. In the first C program we are using For Loop for find the sum and in the second program we are doing the same using

Topological Sortings of a Directed Acyclic

Topological sorting for directed acyclic graph (dag) is a linear ordering of vertices such that for every directed edge 'uv', vertex 'u' comes before v in the ordering. 'Topological Sorting'

Program Construct a Balanced Binary Tree

Construct a balanced binary tree using sorted array. Given binary search tree example. The preorder traversal of binary search tree is as follows. Create a new node and a balanced...

Insert, Update and Delete value Functions

This c++ program code is helpful to manage a menu "base database" using array and shows how to prevent from a wrong input. Its simple to introduce the basic database management