Tree manipulation and traversing

Nice tree manipulation and traversing C /******************************************************* * MYCPLUS Sample Code - https://www.mycplus.com * * * * This code is made available as a service to our * * visitors and is provided strictly for the * * purpose of...

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. C /******************************************************* * MYCPLUS Sample Code -...

Data Time and Year

Starting to use enumerated types: Printing for each day of the week, today, yesterday, and tomorrow, both as a string and as a number. C /******************************************************* * MYCPLUS Sample Code - https://www.mycplus.com * * * * This code is made...

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. C #include < stdio.h > int main(void) { int...

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...

Linear searches.

Read an integer array and then do linear searches. C /******************************************************* * MYCPLUS Sample Code - https://www.mycplus.com * * * * This code is made available as a service to our * * visitors and is provided strictly for the * *...

Finding the Prime number

It prompts the user to enter an integer N. It prints out if it is a prime or not. If not, it prints out all of its proper factors. C /******************************************************* * MYCPLUS Sample Code - https://www.mycplus.com * * * * This code is made...

Different Sorting Techniques

Bubble SortInsertion SortSelection SortShell Sort C /******************************************************* * MYCPLUS Sample Code - https://www.mycplus.com * * * * This code is made available as a service to our * * visitors and is provided strictly for the * *...

Adding Numbers

Read a sequence of positive integers and print them out together with their sum. Use a Sentinel value (say 0) to determine when the sequence has terminated. [sourcecode language=’cpp’] /******************************************************* * MYCPLUS...

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. C /******************************************************* * MYCPLUS Sample Code - https://www.mycplus.com * * * * This code is made...

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...

Automated system for Bank Management

This is an automated system for Bank Management. It uses files to handle the daily transactions, account management and user management. Nice graphical layout and mouse functionality. Manager can add, edit and delete the users and manage the user accounts. C...

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 * *...

Reading Text Files

It contains a program that is given as command parameter the name of a text file, say, temp.dat. It will read each line of temp.dat and print out in correspondence the number of characters and words on that line. At the end it will print out the number of lines that...

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 * *...

Fly away to your vacation

The object of the game is to get to your proper plane on time so you can fly away to your vacation. Of course there a few obstacles and problems along the way and they will be brought up at the appropriate time. It will be up to you to solve the puzzles associated...

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...

Function that returns the date and time in different formats

This is a visual basic 6.0 source code function that returns the date and time in different formats. It returns Full Date, Short Date and in different formats. ASP '******************************************************* '* MYCPLUS Sample Code -...

Export all the slides from a powerpoint presentation

This is a very simple Visual Basic source code to export all the slides from a powerpoint presentation. This source code can export images in any specified image format like .jpg, .bmp or .gif. I wrote this function while I was working on my undergraduate project...

Inverts the case of the selected text

This is a visual basic 6.0 source code that inverts the case of the selected text. If the upper case text is selected then it will convert it into lower case text. Otherwise to upper case. ASP '******************************************************* '* MYCPLUS Sample...