Search results for integer



Full question: You are standing in a corridor with N closed doors. The person walks by you and opens every door. Then the second person walks by an ...
Question: Write recursive method that for a positive integer n prints odd numbers Answer: I usually use binary check to solve this type of questions ...
Endianness is the attribute of a system that indicates whether integers are represented with the most significant byte stored at the lowest address or ...
Answer in Java public static void sumFile ( String name ) { try { int total = 0; BufferedReader in = new BufferedRead ...
Answer: There are number of useful predefined macros which are part of the C/C++ standard. During preprocessing, they are replaced respectively by a ...
One of most common question from this area is to write a function which return Nth number of Fibonacci sequence. Fibonacci numbers are a sequence of n ...
The task is given a function rand5() which produces a random integer in the range 1 to 5, write a function rand7() which produces a random integer in ...
Company where asked this question: Google, Microsoft
Write a function or find a logical way of finding a number X1X2X3... such that X1 is the amount of zerror's in the number X2 is the amount of one's X3 ...