-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.c
More file actions
59 lines (53 loc) · 725 Bytes
/
test.c
File metadata and controls
59 lines (53 loc) · 725 Bytes
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
void fun(char k){
return;
}
struct s {
int x;
char z;
};
union s {
int x;
char z;
};
// cree une erreur car il y a une structure deja declarer
/*
struct s {
char e;
};
*/
void main (int argc,char** argv)
{
// declaration
int i,j;
int v;
char* c;
char k;
union s un;
struct s st;
struct s * d;
// qulque operateur
i = 0;
i = 5;
c = &k;
i = i++;
j = i--;
v = i * j;
//test de l'acces
un.x = 1;
st.z = 'r';
//test adr
d = &st;
k = d->z;
// appel de fonction
fun(k);
//test pour putchar
putchar(1);
/* test du if et if else*/
if ( v = i) k = 't';
if (1) ;else i--;
//test des boucles
for (i=0;i<2;i++){};
while (i == j);
// test du retour de fonction
return ;
}