Programmation Avancée en C


memory1.c

00001 #include <stdlib.h>
00002 
00003 int main()
00004 {
00005         char* foo;
00006         int i;
00007         foo = (char*) malloc(10 * sizeof(char));
00008         for (i = 0; i <= 10; i++) {
00009                 foo[i] = 0;
00010         }
00011         return 0;
00012 }