C Programming Tutorials

C Programming Tutorials And Articles
  Title / Author Replies
Views Reverse Sort Order
The code below swaps two nodes in the linked list. The swap operation can be helpful in sorting a linked list and so its very important how to swap the nodes of linked list. Swapping in normal arrays is swap of the data but in linked list its the pointers change and so there is just change in...
7
37,325
Difference between arrays and pointers? What is the purpose of realloc( )? What is static memory allocation and dynamic memory allocation? How are pointer variables initialized? Are pointers integers?
7
33,963
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...
15
33,821
Calculating the factorial of a number is a basic excercise while learning to program in C, many of us have done it iteratively, it can also be done recursively. I am posting both iterative and recursive versions below. /* Recursive Version */ unsigned int recursive_factorial(int n) ...
30
33,488
Implementation os some some elementary operations like insert, delete, search on doubly circular linked list. #include <stdio.h> #include <conio.h> #include <stdlib.h> #include <string.h> #define N 100 struct dclinklist {
8
33,088
The code to swap two variables using macro expansions #include<stdio.h> #include<conio.h> #define SWAPE(x,y) int t;t=x;x=y;y=t; main() { int a,b;
13
31,714
This article assumes that readers are aware of what pointers are and how they are used in 'C'. As a quick overview, A pointer is a special variable which holds the address of a variable of same type. For example : Lets say there is a variable 'int a=10' so,a pointer to variable 'a' can be...
6
31,644
Today we will discuss about Sockets programming paradigm, elements of Sockets applications, and the Sockets API. The Sockets API allows to develop applications that communicate over a network. The network can be a local private network or the public Internet. An important item about Sockets...
7
31,595
Introduction Mouse has revolutionized the computer world. In GUI mouse is very essential for user interaction. it is a simple input device which allows you to point and execute interface in a random and faster manner than the keyboard which provides sequential interface. Mouse Programming is a...
9
31,521
Introduction In this i have made use of recursion to calculate x to the power n #include <stdio.h> main() {
7
31,518
One of my friends, who is learning to program in C, asked me about how to write a program which checks an inputed string is a palindrome or not, without using the header file string.h So here's the solution. #include <stdio.h> void main(void) { char str; int len=0,i=0,j,flag=1;
2
30,408
Mostly people are using this algorithm to compute matrix multiplication: #define n 1000 int main() { int a,b,c; c=0; for( i=0;i<n;++i) {
8
27,945
==================== .FRIENDSHIP CALCULATOR. ==================== #include<stdio.h> #include<string.h> #include<conio.h> main() { clrscr();
5
27,810
When a process terminates abnormally it usually tries to send a signal indicating what went wrong. C programs (and UNIX) can trap these for diagnostics. Also user specified communication can take place in this way. Signals are software generated interrupts that are sent to a process when a...
2
27,435
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();
5
25,811
I worked for a long time for this article. This program is tested on Sun-Solaris system using gcc compiler. In market, there are a lot of tools for detecting the memory leaks. Here I made a program which has to include in your source file and it will tell the desired informations to find where...
42
25,338
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...
1
22,544
1. #include<stdio.h> #include<conio.h> main() { int a,i; for(i=0;i<3;i++) a=i++; for(i=0;i<3;i++)
21
22,086
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");
3
20,824
A Program to check whether entered matrix is symmetric or not. #include<stdio.h> #include<conio.h> main() { int a,at,k,i,j,m,n; clrscr(); printf("enter the order of matrix"); scanf("%d %d",&m,&n);
8
20,309