Question: using c program int year; Write a program that performs the following actions: struct car { char model[72]; // model of the car // year
int year; Write a program that performs the following actions: struct car { char model[72]; // model of the car // year car was produced float enginehp; // horsepower of the engine int doors; // # of car doors float gasmileage; //rotational speed of motor }; l/struct car a. Declares an instance of the structure above, initializes it with values and prints the elements. b. Now pass the structure as a pass-by-value parameter to a function printstructure_pbv() which prints the elements of the structure c. Now pass the structure as a pointer (pass-by-reference parameter) to a function printstructure_pbr() which prints the elements of the structure d. Creates a new variable type for the above structure using typedef and use it for a, b and c
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
