Consider the given structure definition. struct complex { int real; int imag; }; a. Write a C++ statement to create a structure variable. b. Write a C++ statement to store the value 15 to the structure member real.
Answers
Answered by
2
Answer:
// Data Members
int roll;
int age;
int marks;
// Member Functions
void printDetails()
{
cout<<"Roll = "<<roll<<"\n";
cout<<"Age = "<<age<<"\n";
cout<<"Marks = "<<marks;
}
Similar questions