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
solniwko [45]
2 years ago
11

Write C code to define a structure called date that has three fields day, month, year, all of which are ints.

Computers and Technology
1 answer:
amm18122 years ago
8 0

Answer:

The code to define a structure with the characteristics given is:

struct date {

   <em>int </em>day;

   <em>int </em>month;

   <em>int </em>year;

};

Explanation:

First you have to declare your structure using a data type struct(first line) and the name of the structure, inside brackets you define all the members of the structure and the type of each one following the next pattern:

  • struct <em>name_struct </em>{

              <em>type </em>item1;

              <em>type item2;</em>

<em>               /*...</em>        

       };

Finally we get into the correct answer:

struct date {

   <em>int </em>day;

   <em>int </em>month;

   <em>int </em>year;

};

You might be interested in
A port is the point at which a peripheral device attaches to or communicates with a computer or mobile device. True False
soldier1979 [14.2K]

Answer:

True

Explanation:

Computer is a device that is electronically designed to receive input, execute task on the input and give an output or resultant value. It's electronic hardware components are driven by a central software called the operating system. Input, output, memory and storage, and processor units are categories of the hardware components of the computer.

Peripheral hardware devices are externally attached to a computer system to maximise it's functionality. They are connected through extensions like ports, PCIe extensions etc.

5 0
3 years ago
5.8.1: Modify an array parameter. Write a function SwapArrayEnds() that swaps the first and last elements of the function's arra
viktelen [127]

Answer:

see explaination

Explanation:

#include<stdio.h>

/* Your solution goes here */

//Impllementation of SwapArrayEnds method

void SwapArrayEnds(int sortArray[],int SORT_ARR_SIZE){

//Declare tempVariable as integer type

int tempVariable;

if(SORT_ARR_SIZE > 1){

tempVariable = sortArray[0];

sortArray[0] = sortArray[SORT_ARR_SIZE-1];

sortArray[SORT_ARR_SIZE-1] = tempVariable;

}

}

int main(void) {

const int SORT_ARR_SIZE = 4;

int sortArray[SORT_ARR_SIZE];

int i = 0;

sortArray[0] = 10;

sortArray[1] = 20;

sortArray[2] = 30;

sortArray[3] = 40;

SwapArrayEnds(sortArray, SORT_ARR_SIZE);

for (i = 0; i < SORT_ARR_SIZE; ++i) {

printf("%d ", sortArray[i]);

}

printf("\n");

return 0;

}

Please go to attachment for the program screenshot and output

3 0
2 years ago
What lets you do many things, like write book reports and stories?
Shalnov [3]

Answer:

4. application programs

Explanation:

5 0
3 years ago
Document templates are available online.<br> True<br> False
k0ka [10]
True anything is available online.
6 0
3 years ago
Read 2 more answers
Calculate the data rate capacity for a 2400 baud signal where there are M=8 levels per symbol. a. 2400 bps b. 4800 bps c. 7200 b
zimovet [89]

Answer:

C. 7200 bps.

Explanation:

In networking, transmission lines or connectors and ports operates at a specific speed based on the port type and the cable or medium of transmission.

Baud rate is a concept in digital information technology that defines the rate of symbol per channel during transmission. The bit or data rate is the number of bits transfered in a link per second.

The relationship between baud rate and bit rate is;

Bit rate = baud rate x number of symbol bit level

To get the bit rate of a 2400 baud signal with symbol level = 8 = 2^3

Bit rate = 2400 x 3. = 7200 bps.

7 0
3 years ago
Other questions:
  • I need to write a program that accepts eight int values representing student test scores from the user and then displays each of
    14·1 answer
  • Which is an example of an input device?
    15·2 answers
  • Which skill refers to the ability to visualize and implement possible business solutions to problems?
    6·1 answer
  • What are the advantages and disadvantages of malware maintenance?
    12·1 answer
  • Most smartphones use operating systems developed by ________. Select one: A. Symbian and Apple B. Apple and Microsoft C. Microso
    13·1 answer
  • When the CSS property of position is set to ____ it moves the element relative to its original position and allows other element
    10·1 answer
  • Complete the sentence.<br> Python is a_____<br> level language compared to bytecode.
    7·2 answers
  • What statement best describes entrepreneurship?
    7·2 answers
  • Write a program that asks the user to enter a positive integer that represents a number in the decimal system and then displays
    12·1 answer
  • A _____________ delivers all the files that form web pages
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!