Public Void Life Blog

0

C Program to Compare Strings without Using String Functions

This is the C program to compare strings without using predefined string functions #include char string1[100],string2[100]; int flag=1,len1=0,len2=0; main() { int res; printf(“Enter String-1n”); gets(string1); printf(“Enter String-2n”); gets(string2); while(string1[len1]!=’’){len1++;} while(string2[len2]!=’’){len2++;} res=compare(string1,string2); if (res==-1||res==1) process(res);...

0

C Program to Implement Quick Sort

This is the C Program to sort an array using quicksort,it uses divide and conquer mechanism to sort the array Visualization of the quicksort algorithm. The horizontal lines are pivot values. Class Sorting algorithm...