Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- typedef struct studente {
- char nome;
- char cognome;
- int eta;
- } stud;
- struct impiegato
- {
- char nome;
- char cognome;
- int eta;
- };
- //stud diventa un nuovo tipo
- //nel main dichiaro stud
- int main()
- {
- struct impiegato imp;
- imp.cognome='B';
- stud p1;
- p1.nome = 'A';
- printf("%c\n", p1.nome);
- printf("\n");
- printf("%c\n", imp.cognome);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement