Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions APPEND.C
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#include<stdio.h>
#include<conio.h>
void main()
{
int a[10],b[10],i,j,m,n;
clrscr();
printf("Enter the size of first array: ");
scanf("%d",&m);
printf("\nEnter %d elements into first array:\n",m);
Expand All @@ -19,5 +17,4 @@ void main()
printf("\nFirst array after appending second array:\n");
for(i=0;i<m+n;i++)
printf("\n%d",a[i]);
getch();
}
4 changes: 0 additions & 4 deletions BINSEARC.C
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
#include<stdio.h>
#include<conio.h>

int search(int [],int,int);

void main()
{
int a[10],i,n,x,loc;
clrscr();
printf("Enter the size : ");
scanf("%d",&n);
printf("\nEnter %d elements into the array in ascending order:\n",n);
Expand All @@ -17,7 +14,6 @@ void main()
loc=search(a,n,x);
if(loc==-1) printf("\n%d is not found.",x);
else printf("\n%d is found at position %d in the array.",x,loc);
getch();
}

int search(int a[],int n,int v)
Expand Down
3 changes: 0 additions & 3 deletions BSERREC.C
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#include<stdio.h>
#include<conio.h>

int search(int [],int,int);
int binsearch(int [],int,int,int);

void main()
{
int a[10],i,n,x,loc;
clrscr();
printf("Enter the size : ");
scanf("%d",&n);
printf("\nEnter %d elements into the array in ascending order:\n",n);
Expand All @@ -18,7 +16,6 @@ void main()
loc=search(a,n,x);
if(loc==-1) printf("\n%d is not found.",x);
else printf("\n%d is found at position %d in the array.",x,loc+1);
getch();
}

int search(int a[],int n,int v)
Expand Down
3 changes: 0 additions & 3 deletions BSTSEARC.C
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include<stdio.h>
#include<conio.h>
#include<alloc.h>

typedef struct treeNode* treePointer;
Expand All @@ -20,7 +19,6 @@ void main()
int choice,n;
do
{
clrscr();
printf("\n\tBINARY SEARCH TREE OPERATIONS\n");
printf("\n\t\t1. Create");
printf("\n\t\t2. Search");
Expand All @@ -43,7 +41,6 @@ void main()
break;
default:continue;
}
getch();
}while(choice!=3);
}

Expand Down
3 changes: 0 additions & 3 deletions BUBBSORT.C
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#include<stdio.h>
#include<conio.h>

void sort(int*,int);

void main()
{
int a[10],n,i;
clrscr();
printf("Enter the size : ");
scanf("%d",&n);
printf("\nEnter %d elements into the array :\n",n);
Expand All @@ -19,7 +17,6 @@ void main()
printf("\n\nArray after sorting :");
for(i=0;i<n;i++)
printf(" %d",a[i]);
getch();
}

void sort(int a[],int n)
Expand Down
3 changes: 0 additions & 3 deletions CIRQUEUE.C
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include<stdio.h>
#include<conio.h>

#define LENGTH 5

Expand All @@ -15,7 +14,6 @@ void main()
int ch,n;
do
{
clrscr();
printf("\n\tQUEUE OPERATIONS\n");
printf("\n\t\t1.ADD");
printf("\n\t\t2.DELETE");
Expand All @@ -38,7 +36,6 @@ void main()
break;
default:continue;
}
getch();
}while(ch!=4);
}

Expand Down
3 changes: 0 additions & 3 deletions DHEADLIS.C
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include<stdio.h>
#include<alloc.h>
#include<conio.h>

typedef struct listnode* listpointer;

Expand All @@ -27,7 +26,6 @@ void main()
head->next=head->prev=head;
do
{
clrscr();
printf("\n\tLINKED LIST OPERATIONS\n");
printf("\n\t\t1. CREATE");
printf("\n\t\t2. LIST");
Expand Down Expand Up @@ -59,7 +57,6 @@ void main()
break;
default:continue;
}
getch();
}while(choice!=6);
}

Expand Down
3 changes: 0 additions & 3 deletions DOUBLLIS.C
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include<stdio.h>
#include<alloc.h>
#include<conio.h>

typedef struct listnode* listpointer;

Expand All @@ -25,7 +24,6 @@ void main()
int n,pos;
do
{
clrscr();
printf("\n\tLINKED LIST OPERATIONS\n");
printf("\n\t\t1. CREATE");
printf("\n\t\t2. LIST");
Expand Down Expand Up @@ -57,7 +55,6 @@ void main()
break;
default:continue;
}
getch();
}while(choice!=6);
}

Expand Down
3 changes: 0 additions & 3 deletions EXCHANGESORT.C
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#include<stdio.h>
​#​include​<​conio.h​>
void main(void)
{
int array[5], i, j, temp,n;
​   ​clrscr​();
printf("Enter the number of elements : ");
scanf("%d",&n);
printf("Enter %d numbers : ",n);
Expand All @@ -28,5 +26,4 @@ void main(void)
{
printf(" %d ",array[i]);
}
getch();
}
2 changes: 0 additions & 2 deletions HEADLIST.C
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include<stdio.h>
#include<alloc.h>
#include<conio.h>

typedef struct listnode* listpointer;

Expand Down Expand Up @@ -63,7 +62,6 @@ void main()
break;
default:continue;
}
getch();
}while(choice!=7);
}

Expand Down
3 changes: 0 additions & 3 deletions INSSORT.C
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#include<stdio.h>
#include<conio.h>

void sort(int*,int);

void main()
{
int a[10],n,i;
clrscr();
printf("Enter the size : ");
scanf("%d",&n);
printf("\nEnter %d elements into the array :\n",n);
Expand All @@ -19,7 +17,6 @@ void main()
printf("\n\nArray after sorting :");
for(i=0;i<n;i++)
printf(" %d",a[i]);
getch();
}

void sort(int a[],int n)
Expand Down
3 changes: 0 additions & 3 deletions LINKEDLI.C
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include<stdio.h>
#include<alloc.h>
#include<conio.h>

typedef struct listnode* listpointer;

Expand All @@ -25,7 +24,6 @@ void main()
int n,pos;
do
{
clrscr();
printf("\n\tLINKED LIST OPERATIONS\n");
printf("\n\t\t1. CREATE");
printf("\n\t\t2. LIST");
Expand Down Expand Up @@ -57,7 +55,6 @@ void main()
break;
default:continue;
}
getch();
}while(choice!=6);
}

Expand Down
3 changes: 0 additions & 3 deletions LINSEARC.C
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#include<stdio.h>
#include<conio.h>

int search(int [],int,int);

void main()
{
int a[10],i,n,x,loc;
clrscr();
printf("Enter the size : ");
scanf("%d",&n);
printf("\nEnter %d elements into the array:\n",n);
Expand All @@ -17,7 +15,6 @@ void main()
loc=search(a,n,x);
if(loc==-1) printf("\n%d is not found.",x);
else printf("\n%d is found at position %d in the array.",x,loc);
getch();
}

int search(int a[],int n,int v)
Expand Down
3 changes: 0 additions & 3 deletions LISTSORT.C
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include<stdio.h>
#include<alloc.h>
#include<conio.h>

typedef struct listnode* listpointer;

Expand All @@ -21,7 +20,6 @@ void main()
int choice;
do
{
clrscr();
printf("\n\tLINKED LIST OPERATIONS\n");
printf("\n\t\t1. CREATE");
printf("\n\t\t2. LIST");
Expand All @@ -39,7 +37,6 @@ void main()
break;
default:continue;
}
getch();
}while(choice!=4);
}

Expand Down
3 changes: 0 additions & 3 deletions PATTERNMATCHING.C
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include <stdio.h>
#include <string.h>
#include<conio.h>
void main()
{
char text[20],pat[20];
Expand All @@ -9,7 +8,6 @@ void main()
gets(text);
printf("Enter the pattern to find : ");
gets(pat);
clrscr();

a = strlen(pat);
b = strlen(text);
Expand All @@ -30,5 +28,4 @@ void main()
if (flag==0)
printf("Not found");

getch();
}
3 changes: 0 additions & 3 deletions POLYARR1.C
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include<stdio.h>
#include<conio.h>

typedef struct {int coef,exp;} polynomial;

Expand All @@ -10,7 +9,6 @@ void main()
{
polynomial p1[10],p2[10],p3[20],p4[50],t;
int n1,n2,n3,n4,i,j,k;
clrscr();
printf("Number of terms in first polynomial : ");
scanf("%d",&n1);
printf("\nEnter %d terms for first polynomial:\n",n1);
Expand Down Expand Up @@ -53,7 +51,6 @@ void main()
print(p3,n3);
printf("\nPolynomial product : ");
print(p4,n4);
getch();
}

void read(polynomial p[],int n)
Expand Down
3 changes: 0 additions & 3 deletions POLYLIN1.C
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include<stdio.h>
#include<conio.h>
#include<alloc.h>

typedef struct node* polynomial;
Expand All @@ -14,7 +13,6 @@ void main()
{
polynomial p,t;
int i,n;
clrscr();
printf("Number of terms in the polynomial : ");
scanf("%d",&n);
printf("\nEnter %d terms for the polynomial:\n",n);
Expand Down Expand Up @@ -46,5 +44,4 @@ void main()
else if(t->exp==1) printf("%dx",t->coef);
else printf("%dx^%d",t->coef,t->exp);
}
getch();
}
3 changes: 0 additions & 3 deletions POSTFIX.C
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
#include<stdio.h>
#include<conio.h>

int evaluate(char*);

void main()
{
char exp[15];
clrscr();
printf("Enter an expression in postfix form : ");
gets(exp);
printf("\nResult = %d",evaluate(exp));
getch();
}

int evaluate(char *str)
Expand Down
3 changes: 0 additions & 3 deletions QUEUEARR.C
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include<stdio.h>
#include<conio.h>

#define LENGTH 5

Expand All @@ -15,7 +14,6 @@ void main()
int ch,n;
do
{
clrscr();
printf("\n\tQUEUE OPERATIONS\n");
printf("\n\t\t1.ADD");
printf("\n\t\t2.DELETE");
Expand All @@ -38,7 +36,6 @@ void main()
break;
default:continue;
}
getch();
}while(ch!=4);
}

Expand Down
Loading