(vii) Assume that an integer variable needs 4 bytes space, a float variable needs 4 bytes space, and a character variabl

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

(vii) Assume that an integer variable needs 4 bytes space, a float variable needs 4 bytes space, and a character variabl

Post by answerhappygod »

Vii Assume That An Integer Variable Needs 4 Bytes Space A Float Variable Needs 4 Bytes Space And A Character Variabl 1
Vii Assume That An Integer Variable Needs 4 Bytes Space A Float Variable Needs 4 Bytes Space And A Character Variabl 1 (34.81 KiB) Viewed 41 times
(vii) Assume that an integer variable needs 4 bytes space, a float variable needs 4 bytes space, and a character variable needs 1 byte space. Then we need a total of bytes space to store the structure in the RAM memory. struct mydevice { int ports; int port_types [8]; float cost; int cpu_cores[8]; char chips [10]; struct make{ int version; int year; char vendor [10]; }; float current_rating, power_rating; }; (viii) Using the structure defined in Q.1(x) above, declare an array of structures to store information for 200 devices. What is the total storage space for this array? Array of Structures: Total size of the array of structures:
(ix) Consider a declaration char P[101; Then the maximum number of characters (including a null character at the end) that can be stored in this array 15
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply