1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
amm1812
3 years ago
5

When should you use a union type component in a structured variable?

Computers and Technology
1 answer:
Eduardwww [97]3 years ago
7 0

Answer:

The answers to 1st question and part 2A is given. However, the 2B is not given complete and thus cannot be answered.

Explanation:

UNION is a keyword used in C Language to have a commonly shared memory that can be used by multiple elements. It is a data-type that allows different data types to use the same shared memory location.

Importance: If you want to minimize the use of memory by sharing it between different datatype variables, then use UNION. For Ex. Let's suppose I want to use 2 variables a and b of type char and int respectively. Now, suppose int takes memory space of 2 bytes and char takes 1 byte then the total amount of memory needed = 2 + 1 = 3 Bytes. But, we want to first make use of a, and once done, we want to declare variable b. We can limit the memory use by declaring a memory space of 2 bytes (max of a and b). First, we can use this space to store the int variable and when done with it, we can use it to store the char variable.

PART 2A

typedef struct{

  int partNum;

  char partName[25];

} partin;

#define Partin partin

You might be interested in
What the benefit is of folder when working with files
Mariana [72]
It helps you keep things organized and easier to find files

3 0
3 years ago
Henry must choose which type of smart speaker to use in his home. He asked you to help him decide which one will best suit his n
ch4aika [34]

Answer:

(B) Home

Explanation:

Echo is an Amazon product.

Home is a smart speaker developed by Google.  

Cortana is a product of Microsoft.

HomePod is developed by Apple.

If Henry wants to be connected to his Google account, you would recommend him to buy Home, because it is a Google product.

4 0
3 years ago
. In the BorderLayout class, what are NORTH, SOUTH, EAST, WEST, and CENTER?
ycow [4]

Answer:

A BorderLayout corresponds to a layout type where the components are organized along geographical directions represented by NORTH, SOUTH, EAST, WEST, and CENTER.

Explanation:

The layout class is awt determines the actual placement of components in the user interface. BorderLayout is a layout where the components are organized along geographical directions represented by NORTH, SOUTH, EAST, WEST, and CENTER. For example:

Panel p = new Panel();

p.setLayout(new BorderLayout());

p.add(new TextArea(), BorderLayout.CENTER);

p.add(new Button("Close"), BorderLayout.SOUTH);

This code segment will add a textarea at the CENTER of the interface and a button 'Close' towards the SOUTH.

8 0
3 years ago
Which of the following is the correct order of laws (from local to state to federal)
professor190 [17]

Answer:

That, Federal law > Constitutional Law > State law > Local ordinances

Explanation:

4 0
3 years ago
What is the scope of each variable?
kari74 [83]

Answer:

scope of pet name is limited to pet class and color is accessible to the whole program

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • A way to have cells in your spreadsheet change formats based on the value of the cells is called ________.
    8·1 answer
  • How has technology affected the way that you produce art like photographs?
    8·1 answer
  • A network technician is tasked with designing a firewall to improve security for an existing FTP server that is on the company n
    9·1 answer
  • List the step in turning on a computer
    6·1 answer
  • A friend was just promoted to a new job that requires part-time travel, and he has also been promised a new laptop after his fir
    10·1 answer
  • Which statement describes what this command accomplishes when inside and outside interfaces are correctly identified for NAT? ip
    13·1 answer
  • A network administrator determines who may access network resources by assigning users
    10·1 answer
  • PLEASE HELP I mainly only need the answer for 4.
    5·1 answer
  • Interest on loan paid to sangam stores Rs5000(journal entry)​
    13·1 answer
  • Match the following pls help
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!