Answer:
numberOfPrizes%numberOfParticipants==0
Explanation:
- Above expression includes % sign, which means mod.
- Mod of a value with another makes the 1st value divide by 2nd and return the remainder.
- As numberOfParticipants cant be zero (given), the answer must be a proper number.
- If numberOfPrizes is completely divisible by numberOfParticipants then it will return 0 as shown in above expression. True case.
- If a digit other than 0 is a result then it will be false.
Answer:
var findComplement = function(num) {
var start = false;
for (var i = 31; i >= 0; --i) {
if (num & (1 << i)) {//find the leftmost hightest bit 1 and start from there
start = true;
}
if (start) {
num ^= (1 << i);
}
}
return num;
};
var findComplement = function(num) {
var bits = num.toString(2);
var complement = '';
for(var i=0;i<bits.length;i++)
{
complement += (bits[i]==1?0:1);
}
return parseInt(complement,2);
};
Explanation:
The javascript code above would accept a number in the variable complemnt and using the parseint keyword, it converts it to a binary value of that number.
Each bit is converted from the least to the most significant bit, then it is returned to the find compliment function and converted back to an integer.
<span>Crawler-based search engines are what most of us are familiar with - mainly because that's what Google and Bing are. These companies develop their own software that enables them to build and maintain searchable databases of web pages (the engine), and to organise those pages into the most valuable and pertinent way to the user.</span>
Image editing tools like photoshop and GIMP?
Answer:
<h2>c) Date : Date</h2>
Explanation:
A type of attribute of data is called data type in computer science, data types tells the interpreter how a person wants to use the data. The basic data types are supported by most of the programming languages, the basic data types are Integers, float, characters, strings, point numbers and arrays. The terminology may differ from one language to other.