Psst.. new poll here.
[email protected] web/email now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!
Paste
Pasted as C by registered user raphael ( 2 years ago )
#include <stdio.h>
#include <limits.h>
#include <stdbool.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <stdarg.h>
//auteur : Raphael De Oliveira
int main(int argc, char *argv[]){
int tailleTableau = 5;
char** tab;
tab = (char**)malloc(tailleTableau * sizeof(char*));
printf("Tableau size = %d\n",sizeof(tab)/sizeof(tab[0]));
for (int i = 0; i < tailleTableau; i++) {
tab[i] = strdup("J'alloue n'importe quoi");
printf("tab[%d] = %s\n", i, tab[i]);
}
printf("DIvision par 0 :%d\n",5/0);
char* point_tab = &tab[0];
strcpy(point_tab,"changer");
printf("tab[0]=%s\n",tab[0]);
point_tab++;
strcpy(point_tab,"CHanger tab 2");
printf("tab[1]=%s\n",tab[1]);
return 0;
}
Revise this Paste