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
1.Anong uri ng application software ang iyong ginamit upang makapagtutuos ka ng datos?
ss7ja [257]

Answer:

The answer is "Microsoft Excel"

Explanation:

Please find the complete and correct question in the attached file.

It will use Microsoft Excel to calculate formulas may be put throughout every cell. Excel works for use of the readily accessible or available on-line resources.  

It can be linked to multiple files, servers, and information sources. It can also create a factory reset to allow Excel to process a data box folder, that's why it's important to learn to quantify of it's skill.

7 0
3 years ago
What are 2 ways to access the vendor credit screen in quickbooks online?
kiruha [24]

Answer:

First by

Clicking

New Button (+) THEN click Vendor THEN click Credit

Secondly

Click Expenses Center then click New Transaction then finally click Vendor Credit

4 0
3 years ago
Intellectual ______ is the legal term for ownership of intangible assets such as ideas, art, music, movies, and software.
77julia77 [94]

Answer:

<u>Property</u>

Explanation:

Intellectual Property (IP) is the lawful protection of human idea/intellect by unauthorised users. These human intellects are intangible assets that have both moral and commercial value. They include ideas, art, music, movies, software e.t.c.

Common types of Intellectual property include

  • Copyrights
  • patents
  • Trade Marks
  • Trade Secrets
6 0
3 years ago
Read 2 more answers
Question 9<br> Any data in your Access database can be converted into labels using the
kotykmax [81]
Are there any choices
5 0
3 years ago
Describe the connection between computer science and travel.
Blababa [14]
I tried to research but this is all I got I hope this helps in a way

5 0
3 years ago
Other questions:
  • A student is searching through a large box of unused cables and connectors in the classroom. The student finds a ribbon with con
    14·1 answer
  • You are a high school counselor with 9 students who applied for 3 different summer jobs: Job A, Job B, and Job C. Each of the su
    5·1 answer
  • Which of the following is not true about a computer byte? A) It is made up of 8 bits. B) Each letter of the alphabet is stored i
    15·1 answer
  • When Russ opened a website on his browser, he saw an error that the site was not compatible with the browser version he was runn
    9·1 answer
  • Inaccurate __________ is the number-one reason why many small businesses go bankrupt.
    5·1 answer
  • a limited-access expressway. A)allows vehicles to enter or exit only at certain place.B) does not permit trucks or buses.C)has n
    9·1 answer
  • A set of instructions to increase a programmer’s pay rate by 10 percent is hidden inside an authorized program. It changes and u
    12·1 answer
  • Which of the following is time-dependant? Group of answer choices
    8·1 answer
  • _____ selectors are used to select elements based on elements that are adjacent to them in the document hierarchy.
    9·1 answer
  • Is it true or false 1-5
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!