Test Define Struct Named Node Containing 3 Fields Int Data Int Next Int Valid Fields Must Q43810778
For this test, you should define a struct named “node”containing 3 fields:
int data
int next
int valid
*** These fields must be in the above order in the structstatement ***
Then write a function named “init” which accepts an array ofnodes and
performs the following initialization:
– for element[0], set valid=1, data=42 and next=-1
– for elements 1-99, set valid=0, data=999 and next=-99999
A prototype would be:
void init(struct node*);
Expert Answer
Answer to For this test, you should define a struct named “node” containing 3 fields: int data int next int valid *** These fields…
OR