Computer Science, asked by 2mohammedlazim3, 8 months ago

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 Anonymous
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