C Tutorial – Number of Seconds in Decade and Visa-Versa

In a previous C language tutorial post the user “nikko manlangit” asked the following question: “How to convert seconds to decade or vice-versa?”. This C tutorial make use of time.h functions to answer his question. More »


Posted in C Tutorials | Comments Off on C Tutorial – Number of Seconds in Decade and Visa-Versa


Unary and Binary Operator Table

Below you’ll find all the unary and binary operators in one easy table: More »


Posted in C Language Reference | 8 Comments


C Tutorial – Searching for Strings in a Text File

In this C language tutorial we will show you how to search for a string in a text files. We will make use of command-line input, fopen or fopen_c and system to clear the screen. Make sure that you have read and understand the following tutorial C tutorial File I/O using Text Files before you continue this one. Add the end of the tutorial you can download the source code of this tutorial.

We start this C language tutorial with some include statements. To make use of strings in your program you need to make sure that you include the header file string.h
More »


Posted in C Tutorials | 13 Comments


How to make a Calendar in C

In the C tutorial “How to use Time and Date in C” some people asked questions in the comment section about determining dates and day of the week. That’s why we created this tutorial to show you what things you have to lookout for, such as leap years. More »


Posted in C Tutorials | 32 Comments


Writing Memory to a File and Reading Memory from a File in C

In this C programming language tutorial we will look at how to save content from an allocated piece of memory to a (binary) file. We also read it back from a (binary) file into memory and display the content.

Because the program example is longer than the usual examples that we use in our tutorials, we’ve split it into parts. Further down you’ll find an explanation for each part of the source. More »


Posted in C Tutorials | 3 Comments


How to use Time and Date in C

In today’s C programming language tutorial we take a look at how to use time and date from C programs.
To make use of time and date function you need to include the time.h header file from the standard C library.

This header file contains functions and macros that provide standardized access to time and date. It also contains functions to manipulate and format the time and date output. The time.h reference page contains more information about the different time and date functions.

More »


Posted in C Tutorials | 46 Comments


C Tutorial – Command Line Parameter Parsing

In this tutorial we take another look at command line parameter parsing with C programs. In a previous command line parameter tutorial we already looked at some simple command line argument parsing example. Please read that tutorial before advancing below. More »


Posted in C Tutorials | 2 Comments


C Tutorial – Copying a File

In a previous tutorial we already talked about renaming and removing a file. In this C programming language tutorial we look at how to copy a file.

Let’s look at an example: More »


Posted in C Tutorials | 2 Comments


C Tutorial – Deleting and Renaming a File

In two previous tutorials we talked about file I/O functions on text files and file I/O functions on binary files. In this C programming language tutorial we look at how to remove files and how to rename a file. More »


Posted in C Tutorials | 12 Comments


C Tutorial – Binary File I/O

In an earlier tutorial we talked about file I/O functions and the use of text files. In this C programming tutorial we are going to talk about the use of binary files.

Binary files

Binary files are very similar to arrays of structures, except the structures are in a disk-file rather than an array in memory. Binary files have two features that distinguish them from text files: More »


Posted in C Tutorials | 32 Comments