Question: typedef struct { unsigned short limit_0_15; // bits 0 (lowest order) to 15 of limit unsigned short base_0_15; // bits 0 to 15 of base

typedef struct { unsigned short limit_0_15; // bits 0 (lowest order) to 15 of limit unsigned short base_0_15; // bits 0 to 15 of base unsigned char base_16_23; // bits 16 to 23 of base unsigned char limit_and_flag; // bits 16 to 19 of limit and 0 to 3 of flag unsigned char base_24_31; // bits 24 to 31 of base } DESC; Write a function that takes as input three integers base, limit and flag, and a DESC pointer g. The function then populates the memory pointed to by g as per the comments given in the struct description. void populate_desc(int base, int limit, int flag, DESC *g)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
