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
Grace [21]
3 years ago
7

(5 pts) Write the type declaration for a struct DataType named Appointment containing the following members: - a string variable

representing the name of the appointment - A Date variable indicating the date of the appointment where Date is a structure already defined - A Time variable indicating the time of the appointment where Time is a structure already defined
Computers and Technology
1 answer:
7nadin3 [17]3 years ago
5 0

Answer:

  1. struct Appointment {
  2.    char name[20];
  3.    struct Date d;
  4.    struct Time t;
  5. };
  6. struct Date{
  7.    int year;
  8.    int month;
  9.    int day;
  10. };
  11. struct Time{
  12.    int hour;
  13.    int minutes;
  14.    int seconds;
  15. };

Explanation:

To create a struct data type, let use the keyword "struct" and followed with the variable name, <em>Appointment </em>(Line 1).  

Next create the string member, <em>name</em> (Line 2).

Next we need to  include two other struct data types (Date and Time) as part of the member of the existing struct. To do so, we can try to define the struct for Date (Line 8 - 12) and Time (Line 14 - 18) separately.

At last, we include the struct<em> Date</em> & <em>Time</em> into the <em>Appointment </em>struct (Line 3-4)

You might be interested in
Assume a system has a TLB hit ratio of 90%. It requires 15 nanoseconds to access the TLB, and 85 nanoseconds to access main memo
andriy [413]

Answer:

310 ns

Explanation:

Given that

TLB hit ratio = 90%

TLB hit ratio = 90/100

TLB hit ratio = 0.9

Time needed to access TLB = 15 ns

Time needed to access main Memory = 85 ns

Effective memory access time = ?.

The formula for finding the effective memory access time is given by

The effective memory access time = [TLB Hit ratio (main memory access time + required time to access TLB) + [2 * (main memory access time + required time to access TLB)] * (2 - TLB hit ratio)]

On substituting the values given in the question to the equation, we have

The effective memory access time = [0.9 (85 + 15) + [2 * (85 + 15)] * (2 - 0.90)]

The effective memory access time =

[(0.9 * 100) + (2 * 100) * 1.1]

The effective memory access time =

(90 + (200 * 1.1))

The effective memory access time =

90 + 220

The effective memory access time =

310 ns

3 0
4 years ago
Read 2 more answers
What are the purposes of a good web page design?
zimovet [89]

Answer:

To make people interested.

Explanation:

8 0
3 years ago
Read 2 more answers
What is a device driver​
sleet_krkn [62]

Answer:

Explanation:

In computing, a device driver is a computer program that operates or controls a particular type of device that is attached to a computer. ...

4 0
3 years ago
Read 2 more answers
CodeHS 3.4.5. What is the code for four colored triangles.
Delicious77 [7]

Answer:

I thinks its CodeHS 3.4.5.

Explanation:

5 0
4 years ago
What did you predict will happen? Check all that apply. The lioness will attack Thisbe. Thisbe will stay hidden in the cave to a
sesenic [268]

Hi,


Everything applies. It is impossible to predict based on the current data. All scenarios are possible with equal possibility.


Hope this helps.

r3t40

5 0
4 years ago
Read 2 more answers
Other questions:
  • Explain the advantages of taking the aspire test
    15·1 answer
  • A. True <br><br> b. False: most modern computers can understand and execute pseudocode.
    7·1 answer
  • Is it okay to leave your car running while parked?
    15·1 answer
  • Which is the most efficient way to make a row of text bold in every worksheet in a file?
    10·2 answers
  • Explain why you should research a potential employer before actively seeking employment
    12·1 answer
  • What occurs when an application sends user-fed data directly to a web browser without authenticating or deleting the content? Cr
    15·1 answer
  • federal law requires public libraries to install filtering software on computers to prevent children from accessing adult conten
    14·1 answer
  • Refer to the exhibit. A company is deploying an IPv6 addressing scheme for its network. The company design document indicates th
    11·1 answer
  • The EDI ____________layer describes the business application that i
    9·1 answer
  • Smart art is considered a​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!