C Programming Tutorials

C Programming Tutorials And Articles
  Title / Author Replies
Views Reverse Sort Order
Stack is a LIFO abstract type of data structure. The stack is mainly associated with 2 types of functions Push() and Pop(). Push() adds an item on the top of the stack and Pop() removes an item from the top of the stack. Implementation of Stack stack.c #include<stdio.h> #include<string.h>...
Introduction The Source code that follows is for Tetris using BGI under Turbo C/C++ DOS compiler. It is still in the preliminary stages of development and there is a long way to go. Now, this is a demo version where the user isnt supposed to 'play' the game but be a mute spectator - it just...
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,...
Article is originally written by Zeeshan Amjad Introduction Here I am going to give a detail about Recursion in C++. Definition: Recursion is the process where a function is called itself but stack frame will be out of limit because function call will be infinite times. So a termination...
In this article I'm going to show you how to change value of variable during run time. There are many tools around how to do this easily, but I will focus on the way doing it programatically, specifically using C language. Tools I will use: Cheat Engine 6.0 Here is a simple code for login, I...
I wrote a program in C for matching patterns among 2D matrices. In brief, the program accepts a SUBSET matrix & a SUPERSET matrix as I/P from user and helps verify whether the SUBSET matrix is present within the SUPERSET matrix in a continuous manner (provisions have been made for detecting row...
Dev-Cpp is an application which is used to code and run programs in C/C++. It has its variations but none of them come with a pre-installed graphics library. So if you are switching from some primitive editor like TurboC to Dev-Cpp (which follows ANSI specifications correctly) and try to write the...
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...
A simple code of Http-Web-Server in C done by a beginner level programmer. Please suggest if you liked it and lets make it better !! Hows that!!! The Code #include<stdio.h> #include<string.h> #include<arpa/inet.h> #include<netdb.h> #include<sys/types.h> #include<sys/socket.h>
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...
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...
Memory Segment Whenever U create a program and load it on a CPU ie executing UR program. It loads a Process Page on the virtual memory of UR system.That Process page will be mapped to UR Task Struct which will be in UR Process Control Block PCB. ...
Generally a question is asked that if you have given n bits then print out all the possible binary numbers of n bit and so I will try to explain how to get that done. Please don't Copy Paste. Understand The logic because it is useful in other problems as well for eg if n=1 then you can have 0...
As the topic says, self printing programs are nothing but they reproduce themselves as output. Such programs are referred as Quines from the name of the logician Willard van Orman Quine who introduced the concept. I said an 'Ah!!!' when I heard about Quines for first time, spent more hours to...
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...
Commonly used C Preprocessor Directives #define You can use the #define directive to give a meaningful name to a constant in your program. The two forms of the syntax are: Syntax : #define identifier token-string #define identifier token-string
Comma-separated expressions were inherited from C. It's likely that you use such expressions in for- and while-loops rather often. Yet, the language rules in this regard are far from being intuitive. First, let's see what a comma separated expression is. An expression may consist of one or...
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>...
Introduction This article is about the slicing of object while sending the argument through a pass by value mechanism when using polymorphism. Background While we are using passing by address mechanism the address of the base class type as well as the derived class type are same in...
Introduction In C you can effectively change the value of the constant variable. Just compile the following program and you will see the output. void main() { int const i=123; int *ip;