Uncategorized

A SIMPLE DATABASE USING LINKED LIST

I just tried to create a simple static database using link list. I completed with basic CRUD operations. #include<stdio.h> #include<conio.h> #include<string.h> struct table { char name[50]; char add[50]; int age; int salary; struct table *next; }; struct table *head; void insert(); void sort(); void create(); void dis(); void search(); void del(); void main() { int… Continue reading A SIMPLE DATABASE USING LINKED LIST

Rate this:

Uncategorized

Linked List program To Convert A Decimal Number To A Binary One

(LINKED LIST) PROGRAM TO EVALUATE BINARY EQUIVALENT OF A DECIMAL NUMBER :- ————————————————————————————— #include<stdio.h> #include<stdlib.h> #include<conio.h> typedef struct ll { int digit; struct ll *next; }mynode; mynode *head,*start,*new1; void main() { int x,num; clrscr(); head=(mynode *)malloc(sizeof(mynode)); head->next=NULL; head->digit=NULL; printf(“Enter No. Whose Binary Equivalent Is To Be Found : \n”); scanf(“%d”,&num); if(num==0) { printf(“Answer Is 0”);… Continue reading Linked List program To Convert A Decimal Number To A Binary One

Rate this:

Uncategorized

Binary Search Program For Sorted Array

Binary Search Program :- #include<stdio.h> #include<conio.h> void main() { int end, beg ,mid; int a[50],i,flag=0,sear, size ; clrscr(); printf(“Enter the size : \n”); scanf(“%d”,&size); printf(” Enter the element in the array in the shorted manner: \n”); for(i=0;i<size;i++) scanf(“%d”,&a[i]); printf(“Enter the element to be search :\n”); scanf(“%d”,&sear); beg=0, end=size-1; while((beg<=end)&&(a[i]!=sear)) { mid=(beg+end)/2; if(a[mid]==sear) { printf(“\nFound”); flag++;… Continue reading Binary Search Program For Sorted Array

Rate this: