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
3,000
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,915
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,952
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,331
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,813
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,939
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,333
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,730
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
3,783
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,962
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
2,075
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,968
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,415
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,352
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
3,466
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,645
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,775
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,958
Loops are the basic logic building structures in computer programming. It is a way of executing statement(s) repeatedly in specified times, which is termed as iteration. Here different types of loops in C language will be discussed. All of them have same goal, but their way of working is...
0
2,335
Array is a data structure consists of a group of elements of same data type. We can think it as collection of variable of similar data type. Array prototype: Data_type array_name Example: Suppose you have a team of 10 employees. Id is given for every employee. You want to store id, age...
0
1,853