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]
3 years ago
8

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

Computers and Technology
1 answer:
galben [10]3 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
When installing conduit for a mast service, what type of conduit should you use?
lesya692 [45]
The answer is (b) Rigid-metal

If you are installing a conduit for a mast service, the type of conduit to be used should be a rigid metal type. Among the three types of steel conduit, the most preferable to install is the rigid metal type instead of an intermediate metal conduit and electrical metallic tubing. Rigid metal conduit is a ferrous metal.
7 0
3 years ago
Read 2 more answers
Which of the following activities are performed by computer programmers? Choose all that apply.
AleksAgata [21]

Answer:

- They write step by step instructions for a computer to follow.

- They create a logic problem that the computer program can solve.

3 0
3 years ago
etwork behavior analysis system __________ sensors are typically intended for network perimeter use, so they are deployed in clo
jeka94

Answer:

"Inline" is the correct answer.

Explanation:

  • Network behavior analysis (NBA)  or Analysis of network activity seems to be the technique to observe traffic trends that aren't groups or sets throughout the cable network's everyday traffic.
  • Simplest terms, this is the organization's effort to define network anomalies outside pure congested traffic expect a seamless.

So that the above is the correct answer.

6 0
3 years ago
How to find how much storage is left on pc?
FinnZ [79.3K]
Go to your general settings and click on data usage and it should show you how much storage is left.
6 0
3 years ago
Which two keys on the keyboard allow an access user to move the insertion point to the next field to the right in datasheet view
Mashcka [7]
Hey there!

In Microsoft Access, you can click the Tab key then the Enter key on your keyboard to establish a new insertion point directly to the right of your current insertion point when entering data in datasheet view. 

Hope this helped you out! :-)
4 0
3 years ago
Other questions:
  • Julio is the department head for his company's customer service department. His staff has complained that they spend countless h
    13·2 answers
  • What will be the output of the following Python code? class A: def test1(self): print(" test of A called ") class B(A): def test
    15·1 answer
  • Explicit knowledge can be documented and codified, whereas tacit knowledge encompasses insights, judgment, creative processes, a
    9·1 answer
  • "If a user on a laptop complains that they are unable to sign into Windows even though they are certain they are entering the co
    12·1 answer
  • How do you determine which type of operating system that best supports your computer or mobile device?
    5·1 answer
  • What is the full meaning of Internet and WiFi
    6·2 answers
  • Which of the following describes a recording scout's job in the music industry?
    5·2 answers
  • when you sent email your email can be set to automatically keep a copy where do you find these copies​
    13·1 answer
  • What does the Finder do?
    5·1 answer
  • The advantage of using a spreadsheet is:
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!