Answer:
6=110
13=1101
18=10010
27=11011
Explanation:
A decimal number is converted to binary number by constantly dividing the decimal number by 2 till the number becomes zero and then write the remainders in reverse order of obtaining them.Then we will get our binary number.
I will provide you 1 example:-
18/2 = 9 the remainder =0
9/2 = 4 the remainder =1
4/2 = 2 the remainder =0
2/2 = 1 the remainder =0
1/2 = 0 the remainder =1
Writing the remainder in reverse order 10010 hence it is the binary equivalent of 18.
Answer:
a) Global
Explanation:
The scope of a variable declared outside of any function is Global.
Let us consider an example:
int g;
int add(int a,int b){
return a+b;
}
int subtract(int a,int b){
return a-b;
}
Here the variable g is defined outside any function and is accessible anywhere within the program. This is a global variable.
Variables defined within each function - a,b on the other hand have a local scope are are visible only within their respective function bodies.
Answer:
Follows are the method definition to this question:
void Reverse_Order(struct Node* h)//defining a recursive method Reverse_Order that takes structure in parameter
{
if (h == NULL)//use if block to check head equal to null
return;//use return keyword
Reverse_Order(h->next);//call method recursively
cout<<h->data;//print data
}
Explanation:
In the above code, a recursive method "Reverse_Order" takes structure as the parameter, and inside the method, structure variable h is used that uses the if conditional statement to check the header equal to null.
In the condition is true, it will use the return keyword, and in the next step, it calls the method recursively, and print its value in the reverse order.
<span>C. 3
Due to the different speeds of P and S waves, a single seismometers can determine the distance to an earthquake. So, for a single station, the localization is any point on a circle around the station. With 2 stations, you'll have two circles that intersect at two points. The 3rd station is needed in order to determine which of the 2 points is the actual earthquake.</span>