C implementation of Text Box

A small text box for console based applications. It can be used as a help dialog box or showing the tips, hints in a game or as an information box. Its length and height can be changed.

Making Mouse Pointers

How to create the mouse pointers in c language. Different shapes can be given to the mouse pointer by changing the values of the cursor variable array.

Insertion in Arrays

How to insert an element in an array at any point. And then print the updated array 12345678910111213141516171819202122232425262728293031323334353637383940414243 /********************************************************     MYCPLUS Sample Code -...

Linked List Demo

A small linked list traversal program to show the basics of linked lists....

C Program to compare two integer arrays

This C program compares two distinct arrays and if the arrays are same then content results in FALSE. The behavior of comparison is explained when we note that the comparison is a comparison of addresses, not contents....

Simple operations with arrays

The following C programming code performs simple operations on arrays. It initializes an array by two different ways and prints out the result of the array initialization. 12345678910111213141516171819202122232425262728293031323334353637383940414243...

Tree manipulation and traversing

Nice tree manipulation and traversing 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596...

Read/writing/reversing integer arrays

The simple program Reads and traverse, write arrays and reverse the elements in an integer array. [sourcecode language=’cpp’] /******************************************************* * MYCPLUS Sample Code – https://www.mycplus.com * * * * This code...

Print days of week using enum

This C program uses enumerated types to display days of week. The enumerated type is then declared as a different name using typedef keyword i.e. enum days  to typedef enum days days. The function prints for each day of the week, today, yesterday, and tomorrow, both as a string and as a number.

Finding the Prime number in C

A prime number is a number greater than 1 that cannot be formed by multiplying two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number.

C Program to Add Sequence of Numbers

This C program reads a sequence of positive integers as input by the user and print their sum. The program keeps on taking the input from user until user enters number ( 0 ) and program calculates the sum of all input numbers. Finally this C program prints the sum of all the numbers on screen and terminates.

Linear searches.

Read an integer array and then do linear searches. 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091...

Pointer to a Function

An example of using a pointer to a function. It must be pointed out that there is nothing new here, the pointer to a function is available in ANSI-C as well as in C++ and works in the manner described here for both languages. It is not regularly used by most C...

C Implementation of Various Sorting Algorithms

This is a simple C implementation of various sorting algorithms such as Bubble Sort, Insertion Sort, Selection Sort and Shell Sort.   Bubble Sort Bubble sort, is a simple comparison-based sorting algorithm that repeatedly steps through the list, compares adjacent...

Examples and use of Functions

Examples of function declarations, definitions, and use [sourcecode language=’cpp’] /******************************************************* * MYCPLUS Sample Code – https://www.mycplus.com * * * * This code is made available as a service to our * *...

The use of streams with files

The use of streams with files. This programme copy the input file to another file and also print its contents to the IO Stream....

Playing with addresses of variables and their contents

Playing with addresses of variables and their contents: what is done by C with variables, addresses, and values. [sourcecode language=’cpp’] /******************************************************* * MYCPLUS Sample Code – https://www.mycplus.com * *...

Directory Structure

A small script to show all the Directories and Files in a specified Drive or Directory. It shows all the files/folders in a tree with the file size, last modified and other file attributes. It is just like the DIR/P command of the DOS. [sourcecode...