C Programming Tutorials

C Programming Tutorials And Articles
  Title / Author Replies
Views Reverse Sort Order
The C Progrmming Language Standard In 1983, the American National Standards Institute (ANSI) commissioned a committee, X3J11, to standardize the C language. After a long, arduous process, including several widespread public reviews, the committee's work was finally ratified as ANS X3.159-1989...
To check whether entered number is armstrong number or not. #include<stdio.h> #include<conio.h> #include<math.h> main() { int n,sum=0,rem=0,cube=0,n1,i; clrscr(); printf("enter a number");
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....
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 : ...
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...
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...
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 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...
Data files are very essential part of in computer programming. The data we use while programming using the variables of different data types, are unavailable after the program execution. So,there is no way to retrieve the data if we further need. Here comes the necessity of data files. FILE...
There are certain situations where you may want to limit your process's use of system resources like CPU or may want to put certain limitations on things like number of open file descriptors, maximum memory your process can allocate for its data etc. You may use commands like ulimit, sysconf etc to...
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...
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...
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,...
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...
There are a certain functions in C, which if used in a particular combination may cause problems. These problems are due to the conflicting behaviors of the functions. In this article, we will understand the problem caused by using one such combination of functions scanf() and fgets()/gets(). ...
EIP ( Extended Instruction Pointer ) is a register that points to the next instruction...It simply points to the address in which that instruction is placed...So if we overwrite this we can change the direction flow of the program and make it do what we want.... In other words if we overwrite...
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;
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> ...