Home / Expert Answers / Accounting / objectives-pointers-dynamic-arrays-structures-user-defined-types-strings-string-manipulation-pa441

(Solved): Objectives: Pointers, Dynamic arrays, structures, user-defined types, Strings, String manipulation ...



Objectives: Pointers, Dynamic arrays, structures, user-defined types, Strings, String
manipulation, text input/output, files

Objectives: Pointers, Dynamic arrays, structures, user-defined types, Strings, String manipulation, text input/output, files Question 1 (30p): Write a C program that does the following: 1. Declare a structure PC that has the following fields: PC_SerialNumber, Year, and Price_Amount. [5 points] 2. In the main, ask the user to enter the total number of PCs. Create a dynamic array of structures of type PC, and ask the user to fill all the fields for each entry in the array. [5 points) 3. Print all the data of PCs with a price of 500 KD or less. [10 points] 4. Calculate the average year of the PCs in your array. Print the average you calculated. [10 points)


We have an Answer from Expert

View Expert Answer

Expert Answer


C code: #include #include //declare a structure PC struct PC{ int PC_SerialNumber; int Year; int Price_Amount; }; int main(){ //ask the user to enter total number of PCs int n; printf("Enter total number
We have an Answer from Expert

Buy This Answer $5

Place Order