/*
* Klavyeden girilen bir cümlenin, her kelimedeki harflerinin yerlerini
* rastgele şekilde degiştiren bir program yazınız.
*
* Or: Bir cümle girin: C'de dosya islemleri.
* *çıktı: d'Ce osdya slemrieil.
*/
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <stdlib.h>
#define MAX_BUF 1024
char *karistir(char *kelime) {
char t;
int i
, r
, len
= strlen(kelime
);
for (i = 0; i < len; ++i) {
t = kelime[i];
kelime[i] = kelime[r];
kelime[r] = t;
}
return kelime;
}
int main (int argc, char *argv[]) {
char cumle[MAX_BUF] = { 0 };
char *tok, c;
int i = 0;
while ((c
= getchar()) != '\n' && c
!= EOF
&& i
< MAX_BUF
- 1) { cumle[i++] = c;
}
while (tok != NULL) {
}
return 0;
}
LyoKICogS2xhdnllZGVuIGdpcmlsZW4gYmlyIGPDvG1sZW5pbiwgaGVyIGtlbGltZWRla2kgaGFyZmxlcmluaW4geWVybGVyaW5pCiAqIHJhc3RnZWxlIMWfZWtpbGRlIGRlZ2nFn3RpcmVuIGJpciBwcm9ncmFtIHlhesSxbsSxei4KICoKICogT3I6IEJpciBjw7xtbGUgZ2lyaW46IEMnZGUgZG9zeWEgaXNsZW1sZXJpLiAKICogKsOnxLFrdMSxOiBkJ0NlIG9zZHlhIHNsZW1yaWVpbC4KICovCgoKI2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KI2luY2x1ZGUgPHRpbWUuaD4KI2luY2x1ZGUgPHN0ZGxpYi5oPgoKI2RlZmluZSBNQVhfQlVGIDEwMjQKCgpjaGFyICprYXJpc3RpcihjaGFyICprZWxpbWUpIHsKICAgIGNoYXIgdDsKICAgIGludCBpLCByLCBsZW4gPSBzdHJsZW4oa2VsaW1lKTsKCiAgICBmb3IgKGkgPSAwOyBpIDwgbGVuOyArK2kpIHsKICAgICAgICByID0gcmFuZCgpICUgbGVuOwogICAgICAgIHQgPSBrZWxpbWVbaV07CiAgICAgICAga2VsaW1lW2ldID0ga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