01: // il tipo di dato _Bool
02: #include<stdio.h>
03: #include<stdlib.h>
04: #include<time.h>
05: 
06: int main(int argc, char **argv){
07: 
08:   _Bool testaocroce;
09: 
10:   srand(time(0));
11: 
12:   testaocroce = rand()%2;
13: 
14:   if(testaocroce)
15:     printf("Croce!\n");
16:   else
17:     printf("Testa!\n");
18: 
19:   printf("[testaocroce] vale %d e occupa %ld byte\n", testaocroce, sizeof(testaocroce));
20: 
21:   testaocroce = 7; //XXX ??? 
22: 
23:   printf("adesso [testaocroce] vale %d\n", testaocroce);
24: 
25:   return 0;
26: }
27: 
28: 


Se avete commenti o osservaƶioni su questa pagina
mandate un messaggio di posta elettronica a bertoƶƶi@ce.unipr.it