Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- char name[7],buffer[7];
- void permute(char s[7]);
- void main(){
- strcpy(name,"qwe");
- permute(name);
- }
- void permute(char s[7]){
- int i,k;
- char aux,buffer[7];
- for(i=0;i<strlen(s);i++){
- for(k=0;k<strlen(s);k++){
- if(i != k){
- printf("%c <--> %c \n",s[i],s[k]);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment