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
Brilliant_brown [7]
2 years ago
8

Provide the definition for each of the following structures and unions:

Computers and Technology
1 answer:
galben [10]2 years ago
8 0

Answer:

a)

struct inventory  // structure inventory

{

char partName[ 30 ];  // char array

int partNumber;  // variable partNumber

float price;  // FLOAT VARIABLE PRICE

int stock ;  // INT VARIABLE STOCK

int reorder;  // INTEGER VARIABLE RECORDER

};

b)

union data // structure union

{

char c;  // char variable

short s; // short variable

long b; //

long variable float f ;  // float variable

double d ; // double variable

};

c)

struct address  // structure address

{

char streetAddress[ 25 ]; // character array

char city[ 20 ]; // variable char

char  state[ 3 ] ; // state array

char  zipCode[ 6 ] ; // zipcode array

};

d)

structure student  // structure student

{

char firstName[ 15 ]; // array first name

char  lastName[ 15 ] ;  // array last name

struct address * ;  // holding the home address

};

e)

struct test

{

unsigned a:1, b:1, c:1, d:1, e:1, f:1, g:1, h:1, i:1, j:1, k:1, l:1, m:1, n:1, o:1, p:1;

}; // prototype test assign value

Explanation:

Following are the description of the above part

a)

  • By using the struct keyword we declared the structure .In the part (a) we declared the struct  "inventory".In this structure we char array "partName " of size 30 .
  • We holding the 3 int variable "partNumber" , "stock" and "reorder." and 1 float variable i.e "price ".

b)

  • By using the union keyword we declared the union .In the part (b) we created the union .
  • Inside that union we holding different types of datatype that are mention in the question .

C)

  • By using the struct keyword we declared the structure  .In the part (c) we created the structure.
  • Inside that structure we holding array of character of variable "streetAddress","city","state" and "zipcode" by using char array .

d)

  • By using the struct keyword we declared the structure .
  • In this we declared array of "firstname" and "lastname" of char datatype .
  • In the last we create a structure address by using the pointer following by struct address

e)

In the part e we created the test that contain unsigned value of thhe 16 bit and 1 width

You might be interested in
The chart shows changes in sea level from 1995 to 2013. According to the chart, sea levels rose at an average annual rate of 3.2
MariettaO [177]

Answer:

Did the global surface temperature increase steadily from 1995 to 2013?

Did sea ice extent in polar regions reduce because of melting from 1995 to 2013?

Explanation:

Only two questions are directly related to global warnings increasing sea levels:

  • Did the global surface temperature increase steadily from 1995 to 2013? Increasing temperature of the Earth's surface is actually what warming means.
  • Did sea ice extent in polar regions reduce because of melting from 1995 to 2013? If the polar ice melts then the sea levels will rise.

The other three questions were about the negative effects of rising sea levels, but not what could cause them.

5 0
3 years ago
Read 2 more answers
What is the car on the right?
oksano4ka [1.4K]

looks like a rxc custom gt3 with a v6 *badass sport car*

3 0
2 years ago
What is security in Technology<br>​
maria [59]

Answer:

IT security is a set of cyber security strategies that prevents unauthorized access to organizational assets such as computers, networks, and data.

3 0
3 years ago
Read 2 more answers
Does anyone know the code for the beaded bracelet on codehs? pls i really need help
kvv77 [185]

Answer:

Explanation:

If it has not changed since the last time that i used codehs then the code should be the following

penup()

forward(-100)

right(90)

pendown()

def beaded_bracelet():

circle(10)

penup()

forward(20)

left(10)

pendown()

for i in range(36):

beaded_bracelet()

Which should complete the entire function as intended.

6 0
3 years ago
Technician A says that generic scan tools must be able to read all generic OBD-II codes. Technician B says that all generic scan
Likurg_2 [28]

Answer:

A. Technicians A and B

Explanation:

When we're talking about generic scanners and about all OBD-II codes, in this case, both technician A and B is the correct answer. Because we can scan all OBD-II codes with a generic scan.

But the technician A just says generic tools must be able to read all generic OBD-II codes and technicians B just says generic scan tools must be able to read manufacture OBD-II code, both are correct.

4 0
3 years ago
Other questions:
  • Which of the following would likely be covered under homeowners insurance but NOT by renter's insurance?
    9·2 answers
  • MD5 uses a hash value to create a hash which is typically a 32 character hex number and how many bits?
    11·1 answer
  • How does Hadoop work? It breaks up Big Data into multiple parts so each part can be processed and analyzed at the same time on o
    5·1 answer
  • Use NumPy to recreate your answer to Question 1b. The input parameters will both be python lists, so you will need to convert th
    8·1 answer
  • When talking about changes related to information​ technology, the text identifies three interrelated changes that are responsib
    8·1 answer
  • PLEASE HELP, True or False: The term whitespace speaks to the design of a website
    8·2 answers
  • Write a program that inputs a time from the console. The time should be in the format "HH:MM AM" or "HH:MM PM". Hours may be one
    6·1 answer
  • Consumer consequences for illegally downloading software
    6·1 answer
  • Um ok that makes sooo much sence
    11·2 answers
  • PLS HELP ASAP!! which of these would be easier to do in a database program than a spreadsheet program? check all of the boxes th
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!