C Programming Tutorials

C Programming Tutorials And Articles
  Title / Author Replies Reverse Sort Order
Views
Program prints the month without using any system related information but just making some simple calculations of days from the reference day 1/1/1900 as Monday. #include<stdio.h> #include<conio.h> #define Y 1900 /*1/1/1900 Monday*/ void days(int ,int ); void display(int , int );...
0
2,814
Abstract Introduction The interview text References Abstract This is an interview with Dmitriy Vyukov - the author of Relacy Race Detector (RRD) tool intended for verifying parallel applications. In this article you will learn about the history of creating RRD, its basic abilities and...
0
1,762
I've arrived at the source code of a widely know instant messenger Miranda IM. Together with various plugins, this is a rather large project whose size is about 950 thousand code lines in C and C++. And like any other considerable project with a long development history, it has rather many errors...
0
3,446
This time we checked Apache HTTP Server with PVS-Studio. As we had expected, we found errors there. The errors are few. We expected this either. Other developers come across this situation too while testing PVS-Studio on their projects. Unfortunately, the first conclusion you would like to draw...
0
2,050
At times certain tasks need more time to execute and when multiple such tasks are desired then blocking on a single task is not a good practice. To Understand, Think of a program that provides some service but this service takes time to execute. Now, if you want this service again and again then...
0
1,581
Continuing the previous discussion that we did on Unix Threads (Basics) , today we will discuss the concept of 'Thread Synchronization'. Going through a quick recap, we now know that threads are used to make calls to functions non-blocking (asynchronous). One important point that we did not discuss...
0
1,729
In this article, we will discuss different implementations of sleep functions that had flaws to understand how sleep function evolved. Before discussing the sleep function implementations, lets first understand briefly the following two functions : alarm() function From Linux Man page : ...
0
1,995
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 ...
0
2,034
Continuing my previous article Understanding File Handling Functions in C, here in this article let us focus on functions like : fread() // read a chunk of data from file fwrite() // Write a chunk of data to file feof() // Check for end of file indicator ferror() // Check for error...
0
4,195
After writing my previous article Virus Code in Linux - C Code That Changes it's Process Name Run Time, I wondered if a process can change its name then why cannot it change its PID. And what if a process can change both its name and PID after lets say every 1 second? Well it will be a difficult...
0
3,570
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...
0
2,780
This is the fourth post in which I want to share with you some useful observations on error patterns and the ways of fighting them. This time I will touch upon the subject of handling rare and emergency conditions in programs. While examining a number of applications, I came to a conclusion that...
0
1,680
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 : ...
0
1,785
Type casting is an explicit type conversion requested by the programmer to achieve its objective in the program. During any kind of computations involving various data variables of different data types, leads to the need of typecasting. Syntax used: (Data-type-2)<variable/expression of data...
0
1,701
Recently I have been writing a lot on Linux files and functions related to file I/O. So, extending the discussion further in this article lets discuss two more important Linux functions : A) access(const char *pathname, int mode) This function checks whether the calling process can access...
0
2,127
In this tutorial, we'll be looking at the code structure of the 'echo' utility and will try to understand how it works, for those who are unfamilliar with the 'echo' utility, its one of the most basic and most useful utilities in a shell it prints out its arguments on the standard output, if you...
0
2,160
Algorithms are the riches of any programming language. The major objective of any algorithm is being efficient and optimized. For any logical scenarios, the prime and foremost is designing an algorithm. In this article, we shall we be discussing one such scenario to determine the k-th maximum /...
0
2,945
The Need Most of our articles over here are focused on Linux programming. However, many of us, especially beginners are still comfortable and much used to Windows environment, the look and feel of it. And also,many out of them tend to avoid Linux programming because of the pain of installing...
0
9,267
For a given problem, there maybe many solutions, but we always look for a ‘better’ solution. So, how do we determine which solution is ‘better’? In the context of algorithms and programs, we consider a solution as ‘better’ when it uses the minimum resources. Hence, an efficient program will always...
0
3,052
Conditional statements are statements, which are executed depending on some condition being satisfied as true or false. In this tutorial, we will try to learn some conditional statements which include: If-else, switch, break and continue which controls the behaviour of loop to some extent. if...
0
1,021