Answer:
0.0816
Explanation:
8.16 ÷ 100 = 0.0816 (Ans)
<span>There are two sentences here that hint at a bad work habit.
1.She always shows up for work later than she is expected to but delivers her assignments as per her deadlines.
Here we see that Samantha not only is late to work, but she does it regularly. This is an example of a bad work habit, as being on time is one of the responsibilities of an employee. This also sends a bad massage to her coworkers, if she is not punished for it. That can lead to disorganization and loss of production.
2.She always tries her best to learn new skills even though she does not show up for work regularly.
Again, showing up for work is a must, except your company does not explicitly have a flexible work schedule that allows people to work from home or make their own working hours. In Samantha's case that does not seem to be the case and thus this is a bad habit. </span>
<span />
Answer:
Let our mask be 1010000...000. Notice that, if we apply XOR operation to any number with this mask, the first and third bits will be complemented and all other bits will be unchanged. Since for each individual bit, XOR with 0 does not change the value of bit and XOR with 1 changes the value of bit.
Explanation:
To give a hexadecimal number, we should know the number of bits in representation of number.
First, we have to understand what scope is. When variables are declared, they are only available in the code block they're declared in, unless they're global variables (this doesn't apply here).
strFirst is declared in usernameMaker and that is the only place it is available in.
Answer:
Option D The negative number entered to signal no more input is included in the product
Explanation:
Given the code as follows:
- int k = 0;
- int prod = 1;
- while (k>=0)
- {
- System.out.println("Enter a number: ");
- k= readInt( );
- prod = prod*k;
- }
- System.out.println("product: "+prod);
The line 7 is a logical error. Based on the while condition in Line 3, the loop shall be terminated if k smaller than zero (negative value). So negative value is a sentinel value of this while loop. However, if user enter the negative number to k, the sentinel value itself will be multiplied with prod in next line (Line 7) which result inaccurate prod value.
The correct code should be
- int k = 0;
- int prod = 1;
- while (k>=0)
- {
- prod = prod*k;
- System.out.println("Enter a number: ");
- k= readInt( );
- }
- System.out.println("product: "+prod);