C Programming Tutorials

C Programming Tutorials And Articles
  Title / Author Replies Reverse Sort Order
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 : ...
The below program calculates the largest no among the no entered but it just calculates as user inputs them. This can be used with files and as you move ahead in file you can store the max and the min value in a variable when parsing the file. #include<stdio.h> int largest(int,int); void...
==================== .FRIENDSHIP CALCULATOR. ==================== #include<stdio.h> #include<string.h> #include<conio.h> main() { clrscr();
Pointer Pointer is a declared like a variable, but it's not an ordinary variable, it's a fancy variable, that can store address of the another variable. Pointer is very much useful for allocating memory at run time , that's dynamic allocation. Pointers are said to "point to" the variable whose...
I thought of sharing the code snippet. It just does the basic operations like inserting a node at the end of the linked list and deletion of any particular node in the linked list. The deletion of a node in linked list is based on the data of the node and not on the index at which data is located....
Here is the code which displays the Calendar of the month entered by the user. #include<stdio.h> #include<conio.h> #define Y 1900 /*1/1/1900 monday*/ void days(int *,int *); void display(int *, int);
Progarm for addition,transpose and multiplication of array #include<stdio.h> #include<conio.h> void main() { int a,i,k,j,c1,c2,r1,r2; int m1,m2,m3; clrscr();
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...
The thing is that it wonít be really OOP because the encapsulation will be a bit weak and you will have to handle constructors and destructors manually but itís still cool. First of all, basic knowledge: 1) Structures 2) Pointers to Functions 1: Structures A structure is a collection...
Code for Decimal To Binary Conversion #include<stdio.h> void main() { int i,n1,t,w,a,i1=0; float n,f2; clrscr(); printf("PROGRAM FOR DECIMAL TO BINARY CONVERSION\n");
Introduction On 4th August, shabbir posted this question : (at the $1 Daily contest thread) List a set of prime numbers where the sum total of the complete set is 100. So, I thought why not generate try generating *all* such sets of primes, instead of *any* such set ? And, I sat down to...
List of helpful C tools that will help you peek inside a process or an a.out file. Some are specific to Sun OS. I have compiled it into an easy-to-read summary of what each one does, and where to find them. Going through the man pages for each, and try running each on a couple of different a.outís...
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>...
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(). ...
I am attaching a ZIP file that contains a Quiz Making and Participating program. You MUST donwload the ZIP and run the exe. The source code given below would not be sufficient enough. As of Right now, only the participating side is completed - Files are created for individual teams and all their...
Pointer and reference maybe same at assembly level. Try an experiment : # include<stdio.h> int main() { int i =90; int *pointer; int &reference = i; // Line 6
Program to find max(x,y) or Min(x,y) without using any relational and logical operator. int maximum(int x, int y) { int fNum,temp,num; num = x; num = y; temp=fNum; return( temp);
Stack is a Last in First out(LIFO) abstract data structure...Stack is used as the main data structure for processing and data management on most of the OS architectures...like intel x86 etc etc.. Stack based Overflows It happens when to much data is passed on the call stack and results in...
This time I want to speak on the 'printf' function. Everybody has heard of software vulnerabilities and that functions like 'printf' are outlaw. But it's one thing to know that you'd better not use these functions, and quite the other to understand why. In this article, I will describe two classic...
As it is said, great things are in small ones. Its someway true in C as well. Working on bits rather than bytes, and other bigger data structures leverage implementations in speed and space efficiency. With really high end computers coming up these days, bitwise operations may not be that useful in...