C Programming Tutorials

C Programming Tutorials And Articles
  Title / Author Reverse Sort Order Replies
Views
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> ...
11
11,469
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....
5
40,435
Insert a node before a particular node in a linked ist node* ins_bef(node *current) { int rno; /* Roll number for inserting a node*/ node *newnode,*temp; newnode=(node*)malloc(sizeof(node)); printf("\nEnter the roll number before which you want to insert a...
2
81,949
Queue implementation using linked list #include <stdio.h> #include <conio.h> #include <stdlib.h> /***** Structure template *****/ struct list{ char data; struct list *next; };
11
80,940
C implementation of double linked list #include <stdio.h> #include <conio.h> #include <stdlib.h> #include <string.h> #define N 100 struct dlinklist {
3
48,619
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,342
Program for singly circular linked list which inserts, deletes, searches .... data in it #include <stdio.h> #include <conio.h> #include <stdlib.h> #include <string.h> /***** Structure template *****/ struct list{
37
92,704
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
1
7,342
The article discusses about all the number formats viz Binary, Decimal, Octal, Hex and BCD (Binary coded decimal) and conversion from Decimal to Binary, Octal and Hex and also the reverse conversion. Binary A numbering system based on 2 in which 0 and 1 are the only available digits. ...
28
71,055
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;
11
6,943
InFix to PostFix Introduction Infix Expression : Notation in which the operator separates its operands. Eg (a + b) * c. Infix notation requires the use of brackets to specify the order of evaluation. Postfix Expression :
30
95,747
Program tells you the day of the date inputed. Remember when you copy the code paste in a file named *.c and not cpp file as that will cause an error. I have commented in the code where it will cause the error. #include<stdio.h> #include<conio.h> #include<time.h> #define AND && #define OR...
2
4,607
Stack memory Let's suppose there is nothing on the stack to begin with. One of the functions either the calling function or the called function depending on the calling convention would start a stack. Lets take a very simple C / C++ program to see how things would work. int func(int i) {...
1
4,135
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;
3
12,403
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,779
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
34,441
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...
8
11,710
The article explains why hashing have o(1) complexity. This article will clear your doubt that whay hashing has 0(1) time complexity but will not take you deeper . There are certain factors which can affect the time complexity like collision and performance of hashing depends on hashing algorithm....
3
6,140
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...
2
8,044
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...
5
3,586