"Coding is just like talking to a unknown girl. Once you talked to her with guts, the next time you'll never afraid",Really? Yes , try it Now !!!
Everything here is for education and learning purpose only , individual holds rights on outer posts/links etc.
Team Cracking The Code
About Me
▼
Wednesday, February 23, 2011
WAP tp print Combination of given string
#include #include #include
void mycombination(char const * const s, int l, int *arr, int index, int start, int d) { int i,j; if (index >= d) return ; for (j = start ; j < l ; j++) { arr[index] = j; if (index == d-1) { for (i=0;i putchar('\n'); } else mycomb_ultrabad(s,l,arr,index+1,j+1,d); } return ; }
int main() { int i,d; char s[4]={'a','v','i'}; d = strlen(s); int arr[d+1]; for (i=0;i { mycomb_ultrabad(s, d, arr,0,0,d-i); } return 0; }
No comments:
Post a Comment
Hi thanks , we will get back to you shortly !!!