SSL Certificate
  • Provide the definition for each of the following structures and unions
Provide the definition for each of the following structures and unions:
a. Structure inventory containing character array partName[30], integer partNumber, floating point price, integer stock and integer reorder.


b. Union data containing char c, short s, long b, float f and double d.
 c. A structure called address that contains character arrays streetAddress[25],city[20],state[3] and zipCode[6].
 d. Structure student that contains arrays firstName[15] and lastName[15] and variable homeAddress of type struct address from part (c).
 e. Structure test containing 16 bit fields with widths of 1 bit. The names of the bit fields are the letters a to p.
 
( Using Unions) Create union integer with members char c, short s, int I and long b.
Write a program that inputs value of type char, short, int and long and stores the values in union variables of type union integer. Each union variable should be printed as a char, a short, an int and long. Do the values always print correctly? 
 

State which of the follow are true and which are false. If false, explain why.
a. The impressive functions performed by computers essentially involve the manipulation of zeros and ones.  
b. People prefer to manipulate bit instead of characters and fields because bits are more compact.  
c. People specify programs and data items as characters; computers then manipulate and process these characters as groups of zeros and ones.  
d. A person’s zip code is an example of a numeric field.  
e. A person’s street address is generally considered to be an alphabetic field in computer applications.   
f. Data items processed by a computer form a data hierarchy in which data items become larger and more complex as we progress from fields to characters to bits etc.
 

Excellent Solution
================
*Instant Download

Write a review

Please login or register to review

Provide the definition for each of the following structures and unions

  • $9.99


*All your data are SECURED & ENCRYPTED using a valid, trusted server certificate (Comodo SSL) and we don't store credit card information on our servers and all Payments are SECURED & handled by Paypal.
SSL CertificatePaypal

Tags: c, programming, structure, union, partName[30], integer partNumber, floating point price, integer stock, integer reorder