50 likes | 221 Views
#include <string.h> Char str[]=“maca,karo.kupa,sinek”; Char *mtr; Char ayrac[]=“,.”; Char *parca; main() {parca=strtok(str,ayrac);printf(“%s<br>”,parca); parca=strtok(mtr,ayrac);printf(“%s<br>”,parca); parca=strtok(mtr,ayrac);printf(“%s<br>”,parca); parca=strtok(mtr,ayrac);printf(“%s<br>”,parca);
E N D
#include <string.h> Char str[]=“maca,karo.kupa,sinek”; Char *mtr; Char ayrac[]=“,.”; Char *parca; main() {parca=strtok(str,ayrac);printf(“%s\n”,parca); parca=strtok(mtr,ayrac);printf(“%s\n”,parca); parca=strtok(mtr,ayrac);printf(“%s\n”,parca); parca=strtok(mtr,ayrac);printf(“%s\n”,parca); parca=strtok(mtr,ayrac);printf(“%s\n”,parca); }
#include "stdafx.h" #include "stdio.h" #include <string.h> char eng[7][10]={"Monday","Tuesday","Wednesday", "Thursday","Friday","Saturday", "Sunday"}; char trk[7][10]={"Pazartesi","Sali","Carsamba", "Persembe","Cuma","Cumartesi", "Pazar"}; int i; char gun[10]; int main(int argc, char* argv[]) { do { printf("ingilizce gun ismi : "); scanf("%s",gun); for(i=0;i<7;i++) if (!strcmpi(eng[i],gun)) break; if(i>6) printf("gecersiz gun ismi\n\n"); else printf("Turkce karsiligi :%s\n",trk[i]); } while(i>6); return 0; }
#include "stdafx.h" #include "stdio.h" #include <string.h> char harf[27]; int i; int main(int argc, char* argv[]) { for(i=65;i<=90;i++) harf[i-65]=i; harf[i-65]=0; printf("Buyuk harfler : %s\n",harf); printf("Kucuk harfler : %s\n",strlwr(harf)); return 0; }
#include "stdafx.h" #include "stdio.h" #include <string.h> char s[21]="12345678901234567890"; int main(int argc, char* argv[]) { printf("%s\n",s); strset(s,'-'); printf("%s\n",s); return 0; }
Ödev= Ekrandan girilecek bir sayının yazıyla karşılığını ekrana yazan bir program yazınız.