C Programming Tutorials

C Programming Tutorials And Articles
  Title / Author Replies
Views Reverse Sort Order
Listed here are few common complex operations of single linked list that is to be needed by certain applications. These operations should be done in single traversal for improved performance. Here are few of them and their solutions.. 1. Reverse the list. 2. Find n-th node from tail end....
Many of us know that both C and C++ do padding when allocating memory for structure. But only few know that why the complier does it. In short, for the efficient access of the memory for OS, padding is required. In long words, the instruction can be fetched/written one machine word at a time....
There are times when you write a small or a big code and when you execute it you get a very small and precise output 'Segmentation fault'. In a small piece of code its still easy to debug the reason for this but as the code size grows it becomes very difficult to debug. Here in this article, I am...
Typecasting is simply a mechanism by which we can change the data type of a variable, no matter how it was originally defined. When a variable is typecasted into a different type, the compiler basically treats the variable as of the new data type. Example Lets go for a very simple example : ...
Introduction This article explains what downcast are, how to make it safe, and so forth. However, before learning what downcast are, you must be familiar with polymorphism. Background Can you guess what is down-casting…yes it’s an opposite mechanism of up-casting. In upcast the...
In computer programming, a bitwise operation operates on one or two bit patterns or binary numerals at the level of their individual bits. On many computers, bitwise operations are slightly faster than addition and subtraction operations and significantly faster than multiplication and division...
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...
Introduction A command line argument is a parameter which is passed to a program at the time or instant when it is invoked or executed from the command line .This is accomplished by passing information to main() method of the program. It is the information that directly follows the program’s...
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...
What is Dameon Process? A Daemon process is a process which is not associated with any terminal and hence is supposed to run in background. Since, a daemon process involves background processing, it is recommended it should not include any user interaction. Therefore, it should be clear about...
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...
Port scanner in C #include<stdio.h> #include<sys/socket.h> #include<sys/types.h> #include<stdlib.h> #include<netdb.h> int main(int argc,char **argv) { int i,err,net; struct hostent *host;
We will understand a very important function 'fstat()'. We will create a working code to describe the capabilities of fstat() but before that lets theoretically Understand what it does. fstat() as the name suggests is used to get the status of the file. By status we mean all the useful...
Hello My first game of TicTacToe and thought I will put the same here after the Game of Mojo and Max 8 Note :- This will compile in Turbo C 3 Only and the zip contains the executable Version also for you to see. #include <iostream.h> #include <conio.h> #include <stdlib.h> ...
File Splitter is a very useful utility application for downloading . User want to download and store the downloaded files into Floppy disk , Its possible only if the downloaded file size is Less than or equal to 1.38 MB , If file size is more than the floppy disk size then File Splitter is...
GCC provides quite a lot of builtin functions. These functions are part of standard C offered by the compiler and may come in various variants as per the gcc. These are also termed as hardware specific functions which are internally implemented in assembly or we can say machine instructions, with...
Introduction Definition: Pointer is a variable which stores address of another variable. To understand this definition properly, let us separate it into two statements: 1. Pointer is a variable. 2. It stores address of another variable. Consider the first statement, it means that a...
What is OpenGL? OpenGL is a set of standard API's for developing 2D and 3D graphics applications. The standard provides it in the form of a library which can be linked along wih your program (could be C/C++). OpenGL includes vast scope of API's which can be used to render figures, textures,...
Relocating a node in the linked list is one of major operation and I have tried to simulate one type of movement. i.e. moving forward. node* MoveForward(node *current) { int rno; /* Roll number for moving of node */ int n; /* Number of nodes...
Newton Raphson Interpolation Formula implementation in C. #include <stdio.h> #include <conio.h> #define N 100 float comb(float,int); /*****************************************************************/ /***** Newton-raphson-interpolation formula implementation *****/ /***** This...