31 Ağustos 2017, 12:23
|
#1
|
|
タネル
Üyelik tarihi: 23 Ocak 2003
Bulunduğu yer: istanbul
Mesajlar: 540
WEB Sitesi: *
IRC Sunucusu: *
İlgi Alanı: Unreal
Alınan Beğeni: 361
|
Cevap: Örnek Kodlamalar Buraya..
#include <stdio.h>
// Kişi profili ..
struct _kisiprofili{
char nick[10];
char identd[10];
char fullname[20];
};
struct _kisibilgi{
char isim[10];
int yas;
struct _kisiprofili Profil;
};
int main(){
struct _kisibilgi KisiProfili;
FILE *p;
if(!(p = fopen("profil.txt", "w"))){
printf("Dosya acilamiyor..");
}else{
printf("Kullanici Ismini giriniz :\n");
scanf("%s", KisiProfili.isim);
printf("Kullanicinin yasini giriniz :\n");
scanf("%d", &KisiProfili.yas);
printf("Kullanici Adiniz :\n");
scanf("%s", KisiProfili.Profil.nick);
printf("Kullanici Fullname :\n");
scanf("%s", KisiProfili.Profil.fullname);
printf("Kullanici Identd :\n");
scanf("%s", KisiProfili.Profil.identd);
fputs("KULLANICI BILGILERI!\n", p);
fprintf(p, "Kullanıcının ismi ve Yası : %s = %d\n", KisiProfili.isim, KisiProfili.yas);
fprintf(p, "Kullanıcı nicki : %s\nKullanıcı Identd : %s\nKullanıcı Fullname : %s\n", KisiProfili.Profil.nick,
KisiProfili.Profil.identd, KisiProfili.Profil.fullname);
}
fclose(p);
return 0;
}

char *adres = "irc is finished"; for(int i = 0; *(adres + i); i++) { putchar(toupper(adres[i])); }
|
|
Alıntı
|