Question: C Programming Assume the following structure definition: struct inventory { char part_name[30]; int part_number; float price; }; Also assume the following variable declaration: struct inventory

C Programming

Assume the following structure definition:

struct inventory { char part_name[30]; int part_number; float price; };

Also assume the following variable declaration:

struct inventory item;

Which of the following assigns the value bolt to member part_name in the structure:

a.

strcpy(item.part_name, "bolt");

b.

strcpy(part_name , "bolt");

c.

strcpy(inventory.part_name , "bolt");

d.

strcpy(item[0] , "bolt");

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!