Answer:
The switch sends broadcast traffic to all ports like a hub to get the number of ports used and build its MAC address table.
Explanation:
A network switch is a device used in a LAN to connect all available workstations. Unlike a network hub, it is able to send frames from a host or workstation to another using its MAC address table.
An example of a switch is the Cisco 2950 switch. When it is first turned on, it acts as a hub, broadcasting traffic to all its ports. This process is used to create a MAC address table to get the IP address of workstations and the ports they relate to, enabling it to send unicast traffic to a specific port.
Strings can usually be dealt with as arrays of characters.
sentence[ -1 ]
sentence.substring( sentence.size() -1 );
Explanation: It's something like siri. It's a machine or technology inside a phone or computer that gives you information to a question that you asked.
Answer:
The function in C++ is as follows:
int isSorted(int ar[], int n){
if (
||
){
return 1;}
if (
<
){
return 0;}
return isSorted(ar, n - 1);}
Explanation:
This defines the function
int isSorted(int ar[], int n){
This represents the base case; n = 1 or 0 will return 1 (i.e. the array is sorted)
if (
||
){
return 1;}
This checks if the current element is less than the previous array element; If yes, the array is not sorted
if (
<
){
return 0;}
This calls the function, recursively
return isSorted(ar, n - 1);
}