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 ( 1 year 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
struct personne{
int age;
char* nom;
char* prenom;
};
void clear(struct personne * p){
p->age=0;
}
int main(int argc, char *argv[]){
struct personne *p1 = malloc(sizeof(struct personne));
p1->age = 2;
p1->nom = "De OLiveira";
p1->prenom = "Raphael";
printf("L'age de p1 est : %d\n",p1->age);
printf("Le prenom est : %s\n",p1->prenom);
printf("Le nom de p1 est : %s\n",p1->nom);
clear(p1);
printf("L'age de p1 apres la fonction clear est : %d\n",p1->age);
return 0;
}
Revise this Paste