Multiple choice technology embedded technologies

Here is the scenario where in you design a critical real-time Systems and usage of variables are strict , you need to reduce the Code and Programming RAM size. Assume you are using a Character Datatype (say char GetData) and utilizing only 3 bits under. Which programming technique you adopt to de-allocate or free 5 bits from GetData ?

  1. Use Macros

  2. Usage of Structures

  3. Combination of Both Structures and Unions

  4. Macros and Structures

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In resource-constrained low-level programming, defining structures with bit-fields combined inside unions allows developers to overlay small bit-width fields onto larger datatypes, effectively reusing or freeing the remaining bits of the character for other union members to optimize RAM usage.