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
Get step-by-step solutions from verified subject matter experts
