Answer:
void countUp(int num)
{
if(num==0) //base case.
return;
countUp(num-1);//Recursive call.
cout<<num<<" "; //printing the number.
}
for input num=25
Output:-1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Explanation:
I have used recursion to print the numbers the function is in c++ language.In every recursive call we are decreasing num by 1.As the base case is reached.Then it will backtrack from 1 to num and then we are printing while backtracking.
Answer:
MAC Addresses (Destination and Source MAC address)
Explanation:
A switch has 3 primary functions:
- Forward frames
- Learn addresses
- Avoid loops
An Ethernet frame has the header, data and trailer and there are two specific fields in the header that helps the switch to know where to send data in future transmissions.
- destination MAC address
- source MAC address
every Ethernet frame has this and when the frame hits a switch or any device, any device can look at it ( an Ethernet frame ) and know where it is suppose to go and where it came from.
Every switch has a MAC address table where it stores MAC addresses of different computers on the network.
Example:
When a PC1 sends a frame to PC2 through a switch, the switch looks at the header of the Ethernet frame for the source mac address and adds the source MAC address to its MAC address table and also the port that it came through.
simply put:
A switch looks at the source MAC address to see if it knows it already, if it does. Great! no need to add it again to it's address table.
If it doesn't, it adds it's source address and the port that the frame came from.
This basically how the switch populates its MAC address table.
Answer:
d so if he comes back any time soon
Explanation: