Write a program that
defines a simple structure called
Person. The structure has the
char*,
int, and
double fields. Declare a variable of this structure type inside the
main and assign values to each member field. Print out the values:
struct Person
{
char *name;
int age;
double salary;
};
int main(void)
{
struct Person o;
o.name = "John Doe";
o.age = 35;
o.salary = 2500.00;
printf("Name: %s\n", o.name);
printf("Age: %d\n", o.age);