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
Google’s adwords system provides a quality score as a measure of _____, which indicates the usefulness of an ad message to consu
Vanyuwa [196]
The term that best fit the blank is RELEVANCE. The Google Adwords system is a system that is created by Google for the purpose of advertising online. Therefore, relevance is very important in this aspect as this shows how useful the ad is to the consumers who are doing the google search.
3 0
2 years ago
. the web is based on the ________ protocol
elena55 [62]
The standard (and default) port for HTTP<span> servers to listen on is 80, though they can use any port. </span>HTTP<span> is based on the </span>TCP/IP protocols<span>, and is used commonly on the Internet for transmitting web-pages from servers to browsers.</span>
3 0
3 years ago
Which slide elements must Claire use to enhance her presentation?
Alja [10]
She needs to use animations to enhance her presentation
8 0
2 years ago
The Joint Photographic Experts Group developed the ___________ graphic format.
jolli1 [7]
1. <span>The Joint Photographic Experts Group developed the jpeg graphic format. 
2. </span><span>It is important to include the alt attribute of the tag because some people use text-only Web browsers. </span>
4 0
3 years ago
Read 2 more answers
I have a summary to write for my robotics class but it is way too hard and i have a bery less time. If you can help me it would
Ierofanga [76]

Answer:

What is Robotics?

Robotics is the branch of technology that deal with the design, construction, operation and application of robots as well as computer system for there control, sensory feed back, and information processing. the design of given robotic system often contain principle of mechanical or electronic engineering and computer science. The word robotic was first used in 1941 by the writer Isaac Asimov.

Branches of robotics:

Artificial intelligence: The developing of an intelligence of machine and is a branch of computer science.

Nano Robotics : the field of creating machines that are at a scale of a nano meter.

Tele-presence: The study given to an illusion of being at a place without being there physically.

Robot Locomotion: The study of method that Robots used to transport them selves from place to another.

Robots have long captured the human imagination but despite many advances robots have yet to reach the potential so often envisioned in science fiction today engineers and computer scientist are still pursuing one missing ingredient high intelligence it would be nice for example: if robots possessed the intelligent needed to cope  with uncertainty, learn from experience and work as team.

Intelligent robots will be one of the engineering achievement of 21 century said Junku Yuh, how leads the robotics program in the national science foundation computers and information science and engineering directorate "we will see them more and more in our daily life".

5 0
3 years ago
Other questions:
  • A disk rotates at a rate of 7200 revolutions per minute. Seek operations (i.e., moving the access head to a desired track) take
    6·1 answer
  • On a DTP project, Morgan is preparing digital files to be sent to a printer. Which word describes the activity that Morgan is pe
    5·2 answers
  • A​ _______ helps us understand the nature of the distribution of a data set.
    10·1 answer
  • A group of students want to create an educational online game for computer laboratory in their school which type of network will
    6·1 answer
  • A school principal trying to find out if parents will help buy new playground equipment shows digital leadership by.
    8·2 answers
  • What does a computer need from people in order to solve problems effectively?
    9·1 answer
  • If your pulse is higher than your Target Heart Rate during exercise, what should you do?
    5·2 answers
  • What is the exclusive legal right granted to all authors and artists that gives them sole ownership of their work to print, publ
    5·2 answers
  • Write a function solution that, given an array A consisting of N integers, returns the number of fragements of A whose sum equal
    9·1 answer
  • Where is the flash drive listed in a windows 7 save as dialog box?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!