Data Strucrures






Template for SLL


   Linear Search and Binary Search PPT

#include<stdio.h>
#include<stdilib.h>
struct node
{    
    int data;    
    struct node *link;
};        
//declare all functions here
void main()
{    
    struct node *start=NULL;    
    int choice;    
    while(1)    
    {        
        printf("\n1. Create SLL");        
        printf("\n2. Display SLL");        
        printf("\n3. Search");        
        printf("\n4. Add at Begin ");        
        printf("\n5. Add at End");        
        printf("\n6. Add in between");        
        printf("\n7. Delete");        
        printf("\n0. Exit");        
        printf("\nEnter your choice : ");        
        scanf("%d",&choice);        
        switch(choice)        
        {            
             case 1:                
                 break;            
             case 2:                
                 break;            
             case 3:                
                 break;            
             case 4:                
                 break;            
             case 5:                
                 break;            
             case 6:                 
                 break;            
             case 7:                
                 break;            
             case 0:                
                 exit(0);                
                 break;            
             default:                
                 printf("\nWrong choice!!");        
        }    
    }
}