Thursday 27 September 2012

Tree Using Opration Using C language

Tree

a tree is a widely used data structure that simulates a hierarchical tree structure with a set of linked nodes.
A tree can be defined recursively (locally) as a collection of nodes (starting at a root node), where each node is a data structure consisting of a value, together with a list of nodes (the "children"), with the constraints that no node is duplicated. A tree can be defined abstractly as a whole (globally) as an ordered tree

Menu based program for tree operation (Add,Delete,inorder,preorder,postorder print).

#include<stdio.h>
#include<conio.h>
/* Tree Implementation
   By Girfa
   Do not use it on any other website
   */
typedef struct st_tree
{
    struct st_tree *left;
    int data;
    struct st_tree *right;
}tree;
/* Function Prototype */
tree* create(int);
void insert(int n,tree **);
void inorder(tree *);
void preorder(tree *);
void postorder(tree*);
void del(int,tree **);
void main()
{
    tree *root=NULL;
    int n,s,opt;

Wednesday 26 September 2012

HIDDEN PROGRAME IN WINDOW XP

Is it strange to hear , but true that some good programs are hidden in Windows XP !!!


Programs :

1. Private Character Editor :

Used for editing fonts,etc.
** start>>Run
** Now, type eudcedit

2. Dr. Watson :

This an inbuilt windows repairing software !
** start>>Run
** Now, type drwtsn32

3. Media Player 5.1 :

Even if you upgrade your Media Player, you can still access your old player in case the new one fails !!!
** start>>Run
** Now, type mplay32

4. iExpress :

Used to create SetupsYou can create your own installers !
** start>>Run
** Now, type iexpress

Tuesday 25 September 2012

Double Link List Using C Language

Double Link List..

a doubly linked list is a linked data structure that consists of a set of sequentially linked records called nodes. Each node contains two fields, called links, that are references to the previous and to the next node in the sequence of nodes. The beginning and ending nodes' previous and next links, respectively, point to some kind of terminator

Advantage

A doubly linked list can be traversed in both directions (forward and backward). A singly linked list can only be traversed in one direction. 

A node on a doubly linked list may be deleted with little trouble, since we have pointers to the previous and next nodes. A node on a singly linked list cannot be removed unless we have the pointer to its predecessor.
On the flip side however, a doubly linked list needs more operations while inserting or deleting and it needs more space (to store the extra pointer).
Implementation: Complete menu base code
#include<stdio.h>
#include<conio.h>
/*   Double Link List Example
     Developed By Girfa
     do not use it on any other website
*/
typedef struct st_dlist
{
struct st_list *pre;
int data;]
struct st_list *next;
}dnode;
/* Function Prototype */
dnode * create(int);
void addbegin(int,dnode**,dnode**);
void addlast(int,dnode**,dnode**);
void addbefore(int,int,dnode**,dnode**);
void addafter(int,int,dnode**,dnode**);
void del(int,dnode**,dnode**);
void print(dnode*);
void main()
{
dnode *head=NULL,*tail=NULL;
int n,s,opt;

Queue Using Single Link List Using C Language

Queue

a queue is a particular kind of abstract data type or collection in which the entities in the collection are kept in order and the principal (or only) operations on the collection are the addition of entities to the rear terminal position and removal of entities from the front terminal position. This makes the queue a First-In-First-Out (FIFO) data structure. In a FIFO data structure, the first element added to the queue will be the first one to be removed.

Queue Implementation Using Single link list

#include<stdio.h>
#include<conio.h>
/* Queue Implementation using single link list
   Develop By Girfa
   do not use it on any other website
*/
typedef struct st_que
{
int data;
struct st_que *next;
}que;
/* Function Prototype */
que* create(int);
void enque(int,que **,que **);
void deque(que**,que**);
void print(que*);