domenica 25 ottobre 2009

esercizi dal 7 al 21

Free Image Hosting at www.ImageShack.us

QuickPost Quickpost this image to Myspace, Digg, Facebook, and others!
Free Image Hosting at www.ImageShack.us

QuickPost Quickpost this image to Myspace, Digg, Facebook, and others!
Free Image Hosting at www.ImageShack.us

QuickPost Quickpost this image to Myspace, Digg, Facebook, and others!
Free Image Hosting at www.ImageShack.us

QuickPost Quickpost this image to Myspace, Digg, Facebook, and others!

giovedì 22 ottobre 2009

esercizi

Free Image Hosting at www.ImageShack.us

QuickPost Quickpost this image to Myspace, Digg, Facebook, and others!

esercizi

Free Image Hosting at www.ImageShack.us

QuickPost Quickpost this image to Myspace, Digg, Facebook, and others!

martedì 20 ottobre 2009

esercizi

Free Image Hosting at www.ImageShack.us

QuickPost Quickpost this image to Myspace, Digg, Facebook, and others!

esercizi

Dopo tanto tempo si torna a pubblicare nel blog:
Free Image Hosting at www.ImageShack.us

QuickPost Quickpost this image to Myspace, Digg, Facebook, and others!

martedì 17 marzo 2009

terzofile.c

#include
int numeri[10];
int numeri1[10];
int i=0;
char nome[30];
char nomi[10][30];
char nomi1[10][30];
FILE *f1;
void carica(){
printf("digita dieci volte nome ed età\n");
for(i=0; i<10; i++){
scanf("%s %d",nomi[i],&numeri[i]);
}
}
void scrivi(){
f1=fopen("filenumeri.txt", "w");
for(i=0; i<10; i++){
fprintf(f1,"%s %d\n",nomi[i],&numeri[i]);
}
fclose(f1);
}
void leggi(){
f1=fopen("filenumeri.txt" , "r");
for(i=0; i<10; i++){
fscanf(f1,"%s %d",nomi1[i],&numeri[i]);
}
fclose(f1);
}
void stampa(){
for(i=0; i<10; i++){
printf("%s %d\n",nomi1[i],&numeri[i]);
}
}
main(){
carica();
scrivi();
leggi();
stampa();
}
__________________________________________________________________________
Free Image Hosting at www.ImageShack.us

QuickPost Quickpost this image to Myspace, Digg, Facebook, and others!

secondofile.c

#include
int numeri[10];
int numeri1[10];
int i=0;
char nome[30];
char nomi[10][30];
char nomi1[10][30];
FILE *f1;
void carica(){
printf("digita dieci nomi\n");
for(i=0; i<10; i++){
scanf("%s",nomi[i]);
}
}
void scrivi(){
f1=fopen("filenumeri.txt", "w");
for(i=0; i<10; i++){
fprintf(f1,"%s\n",nomi[i]);
}
fclose(f1);
}
void leggi(){
f1=fopen("filenumeri.txt" , "r");
for(i=0; i<10; i++){
fscanf(f1,"%s",nomi1[i]);
}
fclose(f1);
}
void stampa(){
for(i=0; i<10; i++){
printf("%s\n",nomi1[i]);
}
}
main(){
carica();
scrivi();
leggi();
stampa();
}
______________________________________________________________________________
Free Image Hosting at www.ImageShack.us

QuickPost Quickpost this image to Myspace, Digg, Facebook, and others!