In this C language tutorial we are going to look at error handling. Although C programming does not provide direct support for error handling (also called exception handling), there are ways to do error handling.
Of course the programmer needs to prevent errors during coding and should always test the return values of functions called by the program. A lot of C function calls return a -1 or NULL in case of an error, so quick test on these return values are easily done with for instance an ‘if statement’. More »
Posted in C Tutorials |
A new year (have a good new year by the way) a new C language tutorial. We start the year with a C language tutorial where we will look at how to split a text file into multiple files. In previous tutorials we already looked at reading and writing text files in C examples and searching in text files, so in this tutorial we will build on these tutorials. More »
Posted in C Tutorials |
In this C language tutorial we will build upon a previous C tutorial (Binary File I/O) where we took a quick look add binary file IO. In this tutorial we will take a look at how to delete a certain record (found by name) from a binary file and how to read/write a record(s) from or to a binary file. So let’s start! More »
Posted in C Tutorials |
In this C language tutorial we will take a look at call by value and call by reference (also known as pass-by-value and pass-by-reference). These methods are different ways of passing (or calling) data to functions. More »
Posted in C Tutorials |
In this programming algorithm tutorial we will look at how to find out if a string or number is a palindrome or not. A palindrome is a word, phrase, number or other sequence of units that has the property of reading the same in either direction. A few examples of palindrome strings are: “madam”, “dad” and “radar”. More »
Posted in Programming Algorithms |
In this programming algorithm tutorial we will at how we can do a linear search in C language. A linear search algorithm using numbers is very easy to implement. More »
Posted in Programming Algorithms |
In this C programming algorithm tutorial we are looking at how to implement the mathematical formulas to determine area of different shaped triangles. We will look at the triangle, right angled triangle and equilateral triangle. We will give you the formula, the C source code and the results. More »
Posted in Programming Algorithms |
In this C programming algorithm tutorial we are looking at how to implement the mathematical formulas to determine area of a rectangle, circle and trapezium. We will give you the formula, the C source code and the results. More »
Posted in Programming Algorithms |
In this tutorial we will take a quick look at the Floyd’s triangle using the C language. The Floyd’s triangle (named after Robert Floyd) algorithm is a right-angled triangular array of natural numbers. It is defined by filling the rows of the triangle with consecutive numbers, starting with the number one in the top left corner. More »
Posted in Programming Algorithms |
In this tutorial we are looking at how to print a diamond pattern using the C language. The diamond pattern algorithm question is often used in C courses, so it make sense that we also take a look at it. More »
Posted in Programming Algorithms |