C Programming Tutorials

C Programming Tutorials And Articles
  Title Reverse Sort Order / Author Replies
Today while solving a problem, I had to convert integers to string in C to use its indexing capabilities. One simple solution was to use sprintf, which can be done in 2-3 lines, but i was temped to solve this problem without any string manipulation functions. The Code // Change a positive...
This is the code I wrote in my college days and dont quote me on this if something does not go as expected. #include<stdio.h> #include<ctype.h> #include<conio.h> void main() { int c,i,letter;
There are many built in data types in C. But sometimes, the built in data types are not enough to perform the required tasks. In that case, some custom data type can be built to meet the necessary requirements. In this tutorial, the following custom data types are going to be discussed: ...
Introduction Itís my first post here. I will discuss on Date & Time Management Functions of C. Though if someone is only interested about getting the time and date, then it can be done by some trivial function but the goal of this detail discussion is understanding the bios as well as...
Hello every member of go4expert forum. I have something to share with you all. I have successfully developed a date program which prompt a user to enter a date(12/12/2005) and return the day of week(tuesday). #ifndef CONVERTER_H_ #define CONVERTER_H_ struct U_Days { int days; }u_days; ...
The article discusses about all the number formats viz Binary, Decimal, Octal, Hex and BCD (Binary coded decimal) and conversion from Decimal to Binary, Octal and Hex and also the reverse conversion. Binary A numbering system based on 2 in which 0 and 1 are the only available digits. ...
Introduction This artcile talks about Design By Contract Technique with an example to show how it can be used in an Application. Background Most application problems arise because of inappropriate handling of data obtained from external systems that could be a application user, remote...
Article is originally written by Zeeshan Amjad Introduction Here I am going to give a detail about Recursion in C++. Definition: Recursion is the process where a function is called itself but stack frame will be out of limit because function call will be infinite times. So a termination...
Networking is all about transmitting messages from one node to another. The simplest example can be to transmit "Hello World" from one computer to another. Socket programming in C/C++ has already been covered. Today we will see how to check if the transmitted data has any errors. There are many...
Continuation of Developing Linux Utility like 'ls' in C series. In the first part we studied a code that was developed to behave like a basic ls utility. Here in this part I have extended the code to give output in alphabetical order. The code Here is the code : ...
In this article we will extend our code to print more comprehensive information about a file/directory in a directory. Please Refer Developing Linux Utility like 'ls' in C Developing Linux Utility - Part II Arranging Output in Alphabetical Order Example $ ls -l total 148 ...
Most of the people working on Linux must have used the basic command 'ls'. I use it many times a day. It is a very useful command when it comes to displaying the contents of a directory and their properties. For those few who have still not used 'ls' its high time now, go to its man page, study it...
I recently faced a problem regarding these 2 Escape Sequences. So, I thought I should share the difference between these two to clarify to all who may hay have confusion like me. Thanks to Shabbir too...... The Difference There are a few characters which can indicate a new line. The usual...
This article assumes that readers are aware of what pointers are and how they are used in 'C'. As a quick overview, A pointer is a special variable which holds the address of a variable of same type. For example : Lets say there is a variable 'int a=10' so,a pointer to variable 'a' can be...
malloc allocates certain amount of memory during program execution and free de-allocates memory previously allocated using a call to functions like malloc, calloc or realloc. Memory leak can occurs when a program allocates memory but does not release it. Understanding malloc() & free() ...
Implementation os some some elementary operations like insert, delete, search on doubly circular linked list. #include <stdio.h> #include <conio.h> #include <stdlib.h> #include <string.h> #define N 100 struct dclinklist {
C implementation of double linked list #include <stdio.h> #include <conio.h> #include <stdlib.h> #include <string.h> #define N 100 struct dlinklist {
Using URLDownloadToFile function In this article I would want to show you how to download a file from internet using URLDownloadToFile function in C language. I think everybody has ever experienced the downloading a file with Internet Explorer. IE is using directly this function, but It uses...
Environment variables can be thought of as a name value pair that affect the behavior of the processes running on an operating system. For example, to know the value of environmental variable PATH in my system, I do : -laptop ~ $ echo $PATH ...
Error handling has always been dominantly vital in programming. It has become a bit more sophisticated with the object oriented languages, however even in the system programming language like C, error handling is being offered in its own simple ways. Introduction To swim deep into the...