Answer:
The program to this question can be described as follows:
Program:
#include <iostream> //defining header file
using namespace std;
int main() //defining main method
{
int x1,rem,i=1; //defining integer variable
long Num=0;// defining long variable
cout << "Input a decimal number: "; // print message
cin >> x1; //input value by user
while (x1!=0) //loop for calculate binary number
{
//calculating binary value    
rem= x1%2; 
x1=x1/2; 
Num =Num +rem*i;//holding calculate value
i=i*10; 
}
cout <<Num;//print value
return 0;
}
Output:
Input a decimal number: 76
1001100
Explanation:
In the above code, four variable "x1, rem, i, and Num" is declared, in which three "x1, rem, and i" is an integer variable, and one "Num" is a long variable.
- In the x1 variable, we take input by the user and use the while loop to calculate its binary number.
- In the loop, first, we check x1 variable value is not equal to 0, inside we calculate it binary number that store in long "Num" variable, after calculating its binary number the print method "cout" is used to prints its value.  
 
        
             
        
        
        
Answer:
cout << setprecision(2)<< fixed << number; 
Explanation:
The above statement returns 12.35 as output
Though, the statement can be split to multiple statements; but the question requires the use of a cout statement.
The statement starts by setting precision to 2 using setprecision(2)
This is immediately followed by the fixed manipulator;
The essence of the fixed manipulator is to ensure that the number returns 2 digits after the decimal point;
Using only setprecision(2) in the cout statement will on return the 2 digits (12) before the decimal point.
The fixed manipulator is then followed by the variable to be printed.
See code snippet below
<em>#include <iostream>  </em>
<em>#include <iomanip>
</em>
<em>using namespace std;  </em>
<em>int main()  </em>
<em>{  </em>
<em> // Initializing the double value</em>
<em> double number = 12.3456;  </em>
<em> //Print  result</em>
<em> cout << setprecision(2)<< fixed << number;  </em>
<em> return 0;  </em>
<em>}  </em>
<em />
 
        
             
        
        
        
Answer:
b. The names in the list should be in alphabetical order.
Explanation:
A binary search is an algorithm used for searching for an item in a list or array. The algorithm first sorts the data structure into order and then divides it into halves. If the searched item is less than the middle item in the list, then the algorithm searches for the target in the first half, else, in the second half. This reduces the time complexity of the search.
 
        
             
        
        
        
Answer:
console.log(Animal);
Explanation:
The statement written above prints the array Animal which contains objects.There are two to three ways to print the array Animal in javascript. One of the method is written in the answer it prints the arrays in the console of the browser.
You can go to the console by pressing F12 and then clicking on the console.
Other methods to print are 
- Simple write Animal after defining the array.
- Use alert.
- document.write()