C Programming Tutorials

C Programming Tutorials And Articles
  Title Reverse Sort Order / Author Replies
What are Hash Tables? Hash table is a data structure to store key value pairs for all situations. So it is like a table with each entry has a key and a value corresponding to it. So, it is an efficient way of mapping and accessing data. An abstract illustration of hash table: -> Data...
Most of the newbie programmers are fascinated by the term 'hacking' or 'cracking'(to be precise). Generally, they see some weirdly written code (that may visually seem like a painting to any new programmer) and start dreaming of the developer who has written the code as god of programming or...
Processes are the primitive units for alocation of system resources...Each process have their own address space and usually one thread of control. The process which makes another process is called the parent and the process which it makes is called a child process..As we know every process have its...
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 /...
Note : The following source will only work with non-chunked encoding servers...The servers which have enabled the encoding set to chunked will not properly work with this source... And I assume basic knowledge of SOCKETS UNIX API and C language as prerequisites... Source #include<stdio.h>...
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...
This is the second article on avoiding certain errors at the early stage of code writing. In the previous post, we have already advised you to avoid a large number of calculations in one expression. However, we should investigate this question in detail. Let's see what's dangerous about complex...
This is the third article where I will tell you about a couple of new programming methods that can help you make your code simpler and safer. You may read the previous two posts here and here . This time we will take samples from the Qt project. Introduction It was not accidentally that I...
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...
Continuation of Shell-coding basics..I suggest a glance over it before you start reading this.. Testing We'll be using a simple C program to accomplish our task. test.c // #include<stdio.h> we will not be needing this as we are not using any functions from the C library...Just basic...
We all have been using Functions since we stepped into programming. Numerous times we have called a function with some arguments to it. We all know that the basic declaration of a function is : <return-type><function-name>(<comma seperated list of arguments>); For example : int func(int...
Huffman encoding is a compression technique used to compress data for transmission.This program takes string as input from user and shows its encoded form as output with some intermediate outputs as well. The purpose of it is to reduce the number of bits used for each character for its transmission...
Introduction After a long hiatus, I am back. Months without programming and then finally I got some time on my hands. So I set out to code the Huffman's Data Compression Algorithm. And the result is here! :D The code is well-commented and I hav given some additional documentation. Also, I...
Conditional Statements (also called Conditions) are features of a programming language , Which allows it to perform actions depending upon some conditions provided by the programmer , This provides a “ DECIDING” functionality to a computer program and allows for flexible and easy code development....
Suppose a system call was blocked due to some reason (like waiting for a read of some data on terminal) and during this time a signal occurs. Do you know what happens in this scenario? In this article we will discuss the impact of signals on system calls. System calls are different from...
InFix to PostFix Introduction Infix Expression : Notation in which the operator separates its operands. Eg (a + b) * c. Infix notation requires the use of brackets to specify the order of evaluation. Postfix Expression :
Insert a node before a particular node in a linked ist node* ins_bef(node *current) { int rno; /* Roll number for inserting a node*/ node *newnode,*temp; newnode=(node*)malloc(sizeof(node)); printf("\nEnter the roll number before which you want to insert a...
When I was learning to C, our proffessor had given us a problem where we had to enter a number into a sorted array so that the array remains sorted even after the insertion. So, I tried it yesterday, here's the code for it. /* ** To insert an inputed number into a previously sorted...
Code for Integer Into Words #include<stdio.h> void main() { long int n,t; char a={" ","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten"}; char b={" "," ","Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety"}; char c={"...
Integers is a fundamental data type in a C program, They are used to represent a finite subset of mathematical integers, C Provides us with a suite of functions, and quite a lot of modifiers for manipulating these integers , but if these functions and modifiers are not used properly and carefully...