sync: 2026-11-13 12:25
This commit is contained in:
1 parent
e735a215eb
commit
112f3bc871
1 file changed
+14
@@ -1076,5 +1076,19 @@ struct etudiant_s {
|
||||
char prenoms[50];
|
||||
int age;
|
||||
};
|
||||
|
||||
typedef struct etudiant_s etudiant;
|
||||
|
||||
int main(void) {
|
||||
struct etudiant_s auguste = {"Auguste", "Bénédicte", 17};
|
||||
etudiant martin = {"Martin", "Jean-Louis Benjamin", 19};
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
Les seuls opérateurs qui s'appliquent à des enregistrements sont `=`, `&` et `.`.
|
||||
|
||||
```c
|
||||
printf("age : %d\n", martin.age);
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user