The arithmetic logic unit (ALU), which performs arithmetic and logical operations.
The control unit (CU), which extracts instructions from memory and decodes and executes them, calling on the ALU when necessary.
Answer:
for ( initialization; condition;increment)
{
code goes here;
}
in python:
for i in list/range:
code with proper indentation
By initialization above we mean, like int i=0; etc.
By condition like i<10;
and by increment it means like i++, ++i or i+=1; etc
And in python, i can be an integer value if the range is mentioned, and it can be an item of a list if the list is used. We can also use an array, string and various other data structures in python. like we can have characters in a string and so on.
Explanation:
Please check the answer section.
Answer:
a. 1 is a packet, 2 is data, 3 is a frame.
Explanation:
And what is not mentioned is segment which used TCP/UDP and is part of Transport layer. The packet carries the destination and sender IP address, and is part of the Network Layer. The frame has the Mac address of destination device and senders device and is part of data link layer.
Hence segment has no IP address, hence b. is not correct. Also, data cannot have the IP Address, and Frame has the MAC address, Hence, the above answer. And this arrangement is part of Data Encapsulation.
Also keep in mind data can be anything like a series of bits, or any and it can or not have a header.
Answer:
1/2000
Explanation:
import java.util.Scanner;
public class InputExample {
public static void main(String [] args) {
Scanner scnr = new Scanner(System.in);
System.out.print("Enter birth month and date:");//comment this line if not needed
int birthMonth=scnr.nextInt();
int birthYear=scnr.nextInt();
String output= birthMonth+"/"+birthYear+"\n";
System.out.println(output);
}
}
if using this code the out put should be 1/2000