Created
December 11, 2011 19:41
-
-
Save pasali/1462328 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cuhurbaskanı hepsinde cumhur Baskanoğlu | |
vali $1 den $4(dahil) vali_1 gersi vali_2 | |
kaymakam $1 de yok(--- yani) $2ve$3 te k_1_1 $4ve$5 te yok $6 ve $7 de k_2_2 geri kalanda yok | |
b şıkkı için kaymakam değerleri if bloklar içinde olduğundan ve blockların dışını kapsamadıklarından hata verir. | |
3. soruda | |
3.a = 1100 çıktısnı | |
3.b 1001 çıktınısını | |
3.c 1001 çıktısını | |
3.d 1001 çıktısını | |
3.e derleme hatsı verır x belli değil | |
3.f 1100 çıktısını veririr | |
4.soru | |
4a 2200 çıktısını diğerleri 22 çıktısını verir |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
int sesliMi(char ch) | |
{ | |
char *s = "aeiouAEIOU"; | |
return strchr(s, ch) != NULL; | |
} | |
int sessizMi(char ch) | |
{ | |
char *s = "bcçdfghklmnpqrsştvwxyzBCÇDFGHKLMNPQRSŞTVWXYZ"; | |
return strchr(s, ch) != NULL; | |
} | |
int boslukMu(char ch) | |
{ | |
return ch == ' '; | |
} | |
int ulamaVarMi(char *ch) | |
{ | |
if ((sessizMi(*ch) == 1) && (boslukMu(*(ch+1))==1) && (sesliMi(*(ch+2))==1) ) | |
return 1; | |
else | |
return 0; | |
} | |
int ulamaSay(char *mtn) | |
{ | |
int sayac = 0; | |
while( *(mtn + 2) != '\0') | |
{ | |
if(ulamaVarMi(mtn) == 1) | |
sayac++; | |
mtn ++; | |
} | |
return sayac; | |
} | |
int main(void) | |
{ | |
char *ch = "ali top aldı beleş oldu gitti geldi"; | |
printf("toplam = %d\n",ulamaSay(ch)); | |
getchar(); | |
return 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment