0
I don't know why printf don't wiew name and adresse.
To display adresse and name https://code.sololearn.com/cg7WhQ49ifwk/?ref=app
2 Answers
0
Try to use
const char* name
const char* address
0
Use `struct` instead of `union` for the student information.
#include <stdio.h>
struct student // use struct, not union
{
int id;
char nom[50], adresse[50];
};
int main()
{
struct student data = {64, "Malick", "NYC"}; // use struct, not union
printf("ID: %d\n", data.id);
printf("Name: %s\n", data.nom);
printf("Address: %s\n", data.adresse);
return 0;
}