Answer:
•Determine your IP address.
•Verify physical connectivity to the network.
•Check that you have a logical connection to the network.
•Find out what path network traffic takes to get to its destination.
Translate from DNS names to IP addresses.
Whatever you have written on the page is what it'll name it.
Answer:
Given code output is "786".
Explanation:
Code:
list1 = [ 'cyber', 786 , 2.23, 'square', 70.2 ]#defining a list list1 that holds value in parameter
print (list1[1] )#use a print method that prints list index value
In the given code a list "list1" is declared that holds value in it and in the next step a print method is declared that prints the first index value of the list.
Answer:
Following are the program in the C++ Programming Language.
//set header file
#include <iostream>
//set namespace
using namespace std;
//define class
class format
{
//set access modifier
public:
//set string type variable
string res;
//define function
void names(string first_name, string last_name)
{
//set if-else if condition to check following conditions
if(first_name.length()>0 && last_name.length()>0)
{
res="Name: "+last_name+", "+first_name;
}
else if(first_name.length()>0 and last_name.length()==0)
{
res="Name: "+first_name;
}
else if(first_name.length()==0 and last_name.length()==0)
{
res="";
}
}
//define function to print result
void out(){
cout<<res<<endl;
}
};
//define main method
int main() {
//set objects of the class
format ob,ob1,ob2;
//call functions through 1st object
ob.names("John","Morris");
ob.out();
//call functions through 2nd object
ob1.names("Jhon","");
ob1.out();
//call functions through 3rd object
ob2.names("", "");
ob2.out();
}
<u>Output</u>:
Name: Morris, John
Name: Jhon
Explanation:
<u>Following are the description of the program</u>:
- Define class "format" and inside the class we define two void data type function.
- Define void data type function "names()" and pass two string data type arguments in its parameter "first_name" and "last_name" then, set the if-else conditional statement to check that if the variable 'first_name' is greater than 0 and 'last_name' is also greater than 0 then, the string "Name" and the following variables added to the variable "res". Then, set else if to check that if the variable 'first_name' is greater than 0 and 'last_name' is equal to 0 then, the string "Name" and the following variable "first_name" added to the variable "res".
- Define void data type function "out()" to print the results of the variable "res".
- Finally, we define main method to pass values and call that functions.
Answer:
1111000
Explanation:
perform the following. write from right to left:
- is the number even? then write down a 0
- is the number odd? then write down a 1 and subtract 1
- divide by 2
- repeat until you reach 0.
So for 120:
120 is even, so write down a 0 and continue with 120/2=60
60 is even, so write down a 0 and continue with 60/2=30
30 is even, so write down a 0 and continue with 30/2=15
15 is odd, so write down a 1 and continue with 14/2=7
7 is odd, so write down a 1 and continue with 6/2=3
3 is odd, so write down a 1 and continue with 2/2=1
1 is odd, so write down a 1 and finish with 0