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
If you wanted to find out whether an integer contained an even number of 1 bits, which status flag would be useful
AleksandrR [38]

Answer:

The correct answer will be "Parity".

Explanation:

  • Parity seems to be a methodology that tests when information is transferred or missing or overwritten when something is transferred between one storage location to another, and then it is communicated between processors or devices.
  • It would be used whilst also contrasting the container as well as the aggregated parity to evaluate or dual inspect for inaccuracies.
8 0
3 years ago
A technician receives an invalid certificate error when visiting a website with port 443 enabled. Other computers on the same LA
amm1812

Answer:

Option (A) is the right answer.

Explanation:

According to the scenario, the user system is giving the error of invalid certificate while other users on the same network do not report any error, which means that there is some problem in a particular system.

Date and time can also be one of the main cause of this error because wrong date and time creates problem in surfing many websites by giving certificate error.

Hence the most appropriate answer is option (A).

While other option are wrong because of the following reasons:

  • UEFI boot mode is mainly used in booting the operating system and has no connection with network.
  • Logon time is also wrong because if the problem is with the login server, it can not give certificate error.
  • User access control is also not correct because it is used to control the access of the user.
7 0
3 years ago
What is the difference<br> difference between<br> Open<br> and recent<br> command?
Nostrana [21]
The difference between the new and open commands on the file menu are quite simple. The new command creates a brand new file, while the open command opens a file that already exists or has been created.
3 0
3 years ago
Gps receivers are commonly used by individuals to determine their geographic location while hiking and to obtain driving directi
soldier1979 [14.2K]
I think it is true also.
7 0
3 years ago
What will cloud cumputing offer
seropon [69]
Cloud computing allows computers from all around the world that are not being used to be able to do extra computations. This removes many of the limitations of a single computer and lets the user calculate things much faster.
6 0
3 years ago
Other questions:
  • Magnetic ram (mram) uses ____ rather than an electrical charge to store data.
    6·1 answer
  • on average, someone with a bachelor’s degree is estimated to earn _______ times more than someone with a high school diploma
    13·1 answer
  • You are having problems on your Windows 7 computer and you pull up Device Manager to see if there are any alerts. Two of your de
    11·1 answer
  • Can Word Processing (WP) programs be used for DTP? Explain your answer
    7·1 answer
  • What is a Stereo In (&amp; Out) in audio?
    7·1 answer
  • Which of the following is the best example of an installation issue?
    6·2 answers
  • Why do people make Among Us games on Ro-blox, and thousands of people play them, when Among Us is free on all devises?
    10·1 answer
  • Cora is writing a program to make a motorcycle racing game. If Cora wants the speed of the motorcycle to appear on the screen wh
    5·2 answers
  • I need help!! I decided to go back to college this year and am taking Intro to Logic and Programming. I have an assignment due t
    5·1 answer
  • What is white light?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!