C Programming Source Code Examples

Number Base Conversion in C

Number Base Conversion in C – Decimal, Binary and Octal

This is a Number Base Conversion Program written in C. It is designed to assist novice C programmers in understanding and implementing basic number base conversions. New C programmers can use this program as a reference to grasp fundamental concepts of number base conversions and modular programming in the C language.

Telephone Directory C Program

Telephone Directory Program in C

This is telephone directory program written in C and uses BGI Graphics to display data. The program takes Name, Phone Number, Mobile Number, Address and saves it in newly created file. The program also shows saved record on screen. User can find and delete the records too.

Defensive Programming Techniques

Defensive Programming Techniques

This source code is from Thinking in C++, 2nd Edition, Volume 2, by Bruce Eckel & Chuck Allison. You can use Borland, G++ (For version 3 and above only), Microsoft (For C++ with .NET only) to compile and build this source code. Writing perfect software may be a daunting task for developers, but a few defensive techniques which are routinely applied can go a long way toward narrowing the gap between code and ideal. Defensive programming practices are often used where high availability of the application is required, safety if utmost concern, or security is needed for application to work.

Multiplication of Two Matrices in C

Multiplication of Two Matrices in C

This C code multiplies two 2×2 matrices. It prompts the user to input values for both matrices, displays the input matrices, performs matrix multiplication using nested loops, and then prints the resulting matrix. The code adheres to modern C standards, using printf and scanf for I/O and avoiding outdated functions for better readability and compatibility.

Print days of week in C

Display Days of Week using enum Keyword in C

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.

mycplus

Automated System for Bank Management

This C program is a simple banking system designed for novice programmers. The program uses graphics.h for graphical user interface elements, such as windows and buttons, and provides basic banking functionalities like creating a new account, listing all accounts, and handling account transactions. The program starts with an introduction, displaying the name of the bank using basic graphics functions.

Scroll to Top