Answer:
public class Main
{
public static void main(String[] args) {
int [][] a = new int[4][5];
a[0][0] = 1;
a[0][1] = 2;
a[0][2] = 3;
a[0][3] = 4;
a[0][4] = 5;
a[1][0] = 10;
a[1][1] = 9;
a[1][2] = 8;
a[1][3] = 7;
a[1][4] = 6;
a[2][0] = 11;
a[2][1] = 12;
a[2][2] = 13;
a[2][3] = 14;
a[2][4] = 15;
a[3][0] = 20;
a[3][1] = 19;
a[3][2] = 18;
a[3][3] = 17;
a[3][4] = 16;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 5; j++){
System.out.print(a[i][j] + " ");
}
System.out.print("\n");
}
}
}
Explanation:
- Inside the main method, initialize the 2D array with their respective values at the appropriate indexes.
- Iterate over the 2D array using a nested For loop.
- The outer loop iterates over the rows, while the inner loop iterates over the columns of the 2D array respectively.
- Finally inside the nested For loop, print the value of 2D array using the i and j index.
Output:
1 2 3 4 5
10 9 8 7 6
11 12 13 14 15
20 19 18 17 16
He is using a Computer to type out the document, and a Printer for printing the document.
Thank you!
Answer:
1. Processor communication -- this involves the following tasks:
<em>a. exchange of data between processor and I/O module</em>
<em>b. command decoding - I/O module accepts commands sent from the processor. E.g., the I/O module for a disk drive may accept the following commands from the processor: READ SECTOR, WRITE SECTOR, SEEK track, etc. </em>
<em>c. status reporting – The device must be able to report its status to the processor, e.g., disk drive busy, ready etc. Status reporting may also involve reporting various errors. </em>
<em>d. Address recognition – Each I/O device has a unique address and the I/O module must recognize this address. </em>
<em />
2. Device communication – The I/O module must be able to perform device communication such as status reporting.
3. Control & timing – The I/O module must be able to co-ordinate the flow of data between the internal resources (such as processor, memory) and external devices.
4. Data buffering – This is necessary as there is a speed mismatch between speed of data transfer between processor and memory and external devices. Data coming from the main memory are sent to an I/O module in a rapid burst. The data is buffered in the I/O module and then sent to the peripheral device at its rate.
5. Error detection – The I/O module must also be able to detect errors and report them to the processor. These errors may be mechanical errors (such as paper jam in a printer), or changes in the bit pattern of transmitted data. A common way of detecting such errors is by using parity bits.
Answer:
Documents containing CUI must be destroyed by shredding..
Explanation:
Hope it helps you..
Your welcome in advance..
(ㆁωㆁ)