in C,
Define a structure consisting of two floating-point parameters, called real and imaginary. Include the tag (named) complex within the definition. Declare the variables x1, x2 and x3 to be structures of type complex, as described in the preceding problem.
Expert Answer
1. Answer
struct complex
{
float real;
float imaginary;
};
or
struct complex
{
float real, imaginary;
}real, imaginary;
2. Answer
typedef struct
{
float real, imaginary;
}complex;
or
typedef struct comp
{
float real, imaginary;
}complex;