Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 . Struct animal { String name; String colour; int legs; bool jump; }; Explanation : name ,colour are defined as string , legs as
1 . Struct animal
{
String name;
String colour;
int legs;
bool jump;
};
Explanation : name ,colour are defined as string , legs as int indicates num of legs and jump indicates weather it is fliable or not
2. Struct animal s;
strcpy(s.name, "elephant");
strcpy(s.colour,"grey");
s.legs=4;
s.jump=false;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started