1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
|
#include "header.h"
#include <stdio.h>
#include <string.h>
void test(){
printf("\n test :Coucou \n\n");
}
void testValeurInt(int t){
printf("\n\n Test valeur -> Mon int est : %d",t);
}
void testValeurTableauInt(int t[]){
printf("\n\n Test valeur Tableau ->");
int i = 0;
printf("\n liste :");
while(i<10){
printf("\n i = %d",t[i]);
i++;
}
}
void testValeurTableauChar(char t[]){
printf("\n\n Test valeur char -> char : %s",t);
}
void testPointeurInt(int *t){
printf("\n\n Test Pointeur int -> t = %d",*t);
}
void testPointeurTableauInt(int * t){
printf("\n\n Test pointeur tableau (int *t)->");
printf("\n Liste :");
int i=0;
while(i<10){
printf("\n i = %d",t[i]);
i++;
}
}
void testPointeurTableauI(int *t[]){
printf("\n\n Test pointeur tableau (int *t[]) ->");
printf("\n Liste :");
int i=0;
while(i<10){
printf("\n i = %d",*t[i]);
i++;
}
}
void testPointeurTableauChar(char *t){
printf("\n\n Pointeur tableau de char : %s",t);
}
int testRetourInt(int i){
i = i * i;
return i;
}
void testRetourPointerInt(int *i){
*i = (*i)*(*i);
}
char* testRetour(char * t){
strcat(t," - je rajoute !!!!\0");
return t;
}
void testValeurStructure(Structure structre){
printf("\n test valeur Structure -> name : %s , age : %d rue : %s",structre.name,structre.age,structre.adresse->rue);
}
void testPointeurStructure(Structure *structre){
printf("\n test pointeur Structure -> name : %s , age : %d rue : %s",structre->name,structre->age,structre->adresse->rue);
}
void testPointeurTableauStructure(Structure *structure){
int i = 0;
printf("\n\n Test tableau de strucutre :");
while(i<10){
printf("\n Structure %d : name : %s",i,structure[i].name);
i++;
}
}
void testPointeurFonction(void *testFunct){
void (*pointeurSurFonction)(void);
pointeurSurFonction = testFunct;
(*pointeurSurFonction)();
}
int testReturnPointeurFonction(int (*testFunct)){
typedef int (*PtrFonct)();
PtrFonct pf = testFunct;
int i = pf();
return i*i;
}
void testUnionInt(Value value){
printf("\n\n Union int -> %d",value.i);
}
void testUnionChar(Value *value){
printf("\n\n Value Char %s",value->s);
}
int testEnumeration(IoTypeE ioType){
printf("\n\n IoType : %d",ioType);
ioType = IOT_STRING;
return ioType;
} |
Partager