LINEAR SEARCH IN AN ARRAY About Projects Tutorial Videos #include<stdio.h> void main() { int a[10],i,j,n,count=0; printf("enter the array limit:\n"); scanf("%d",&n); printf("enter the array elemants:\n"); for(i=0;i<n;i++) { scanf("%d",&a[i]); } for(i=0;i<n;i++) { for(j=i+1;j<n;j++) { if(a[i]==a[j]) { count=count+1; } } printf("%d repeats %d times\n",a[i],count); } } FREE ZONE TUTOR.................................YOUR FEEDBACK IS OUR KEY TO...
Posts
Showing posts from October, 2017
- Get link
- X
- Other Apps
STRING MANIPULATION STRING MANIPULATION About Projects Tutorial Videos #include<stdio.h> int leng(char s1[10]) { int count=0,i=0; while(s1[i]!='\0') { count++; i++; } return(count); } void con(char s1[10],char s2[10]) { char s[20]; int l1,l2,i,j=0; l1=leng(s1); l2=leng(s2); for(i=0;i<l1;i++) { s[i]=s1[i]; } for(i=l1;i<l2+l1;i++) { s[i]=s2[j]; j++; } printf("--------------------------------------------\n THE CONCATINATED RESULT OF THE ENTERED STRING IS : \n %s\n------------...
- Get link
- X
- Other Apps
C-PROGRAM SORTING ELEMENTS IN AN ARRAY #include<stdio.h> void main() { int a[20],i,j,n,p,ch,min,sw,temp; do { printf("Enter the no of elements "); scanf("%d",&n); printf("Enter the elements "); for(i=0;i<n;i++) scanf("%d",&a[i]); printf("MENU\n1.BUBBLE SORT\n2.SELECTION SORT\n"); printf("enter the choice "); scanf("%d",&ch); ...