Tag Archives: data structures
Basic linklist operations
RCS file: header.h,v Working file: header.h head: 1.1 branch: locks: strict a: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: stdio.h and stdlib.h are added. —————————- revision 1.1 locked by: a; date: 2015/07/02 … Continue reading
Selection Sorting in C
#include<stdio.h> //Program for Selection Sorting int main() { int i,j,a[100],N,temp; printf(“Enter no.of elements you want to sort:\t”); scanf(“%d”,&N);//max no. of elements printf(“Enter %d elements you want to sort:\n”,N); for(i=0;i<N;i++) scanf(“%d”,(a+i)); printf(“\nBefore sorting:\t”); for(i=0;i<N;i++) printf(“%d\t”,*(a+i)); //Sorting Starts for(i=0;i<N-1;i++) for(j=i+1;j<N;j++) if(a[i]>a[j]) { … Continue reading