19
Oct
09

Solve this Quine

Predict the output of this code snippet

#include <stdio.h>
char *p=”#include %c%c char *p=%c%s%c; %c%c void main(){%c%c printf(p,13,10,34,p,34,13,10,13,10,13,10,13,10); %c%c }”;
void main(){
printf(p,13,10,34,p,34,13,10,13,10,13,10,13,10);
}

Frnds this is qn is simple.. I need ur answer with a proper xplanation.

22
Sep
09

$ecret Document$

A businessman in one city needs to send secret documents to his business associate in another city.There are spies trying to get hold of these documents. The documents need to be sent in a case. If the documents are sent in an unlocked case then the documents will be stolen. Anything else in an unlocked case will also get stolen. Both of them have many locks and many cases. Neither of them has the keys to the other person’s locks. How does the businessman send the documents?

Frnds this is a tricky one.. Try thinking laterally else this qn is gonna kill u guys….

22
Sep
09

Crossing the desert

You have to cross a large desert that is 1,000 km long. You have a horse and 3,000 apples. The horse can carry a maximum of 1,000 apples at any time. For every kilometer that the horse needs to travel, it eats one apple before it can start moving. What is the maximum number of
uneaten apples that the horse can transport to the other end of the desert?

Try 2 solve this.Mail me for more info..

10
Sep
09

Will u decrypt th!$ ??

33 444 66 7777 8 33 444 66

Try to get some valid data from the above..

30
Jul
09

Cubes

Cube2A corporate businessman has two cubes on his office desk.

Every day he arranges both cubes  so that the front faces show the current day of the month.

What numbers are on the faces of the cubes to allow this?Note: You can’t represent the day “7″ with a single cube with a side that says 7 on it.

You have to use both cubes all the time. So the 7th day would be “07″.

Mail me if u hav ny doubt. I will publish the answer asap.

24
Jul
09

Easter Eggs-Winxp

# An Indian discovered that nobody can create a FOLDER named as “CON” in XP os. When questioned, microsoft guys were not able to explain but somehow made everyone believe that “CON” is short for “CONsole”. We can’t create a folder named con because it is a DEVICE NAME! Same to com1 or com2. But strange thing is even folder named “PRN” cannot be created .At Microsoft the whole Team, couldn’t answer why this happened even now it is a mystery!

#There r 2 more strange stuff with notepad.Linux_XP

1)Open an empty notepad file
2.) Type “Bush hid the facts” (without the quotes)
3.) Save it as whatever you want.
4.) Close it, and re-open it.

As u can see all characters are hidden.Any sentence with 4 words and 4-3-3-5 being no of letters in each word the result will be the same. How wierd it is?

#1. open notepad
2. write ‘.LOG’ (without quotes)
3. save the file (not SAVE AS, just plain save), any name is valid
4. close the file
5. open it

you’ll notice windows has inserted an entry containing hour and date.

#There is a strange stuff with Windows word too.

Open Microsoft Word and type  “=rand (200, 99)” without quotes and press enter.

Where did you get that from?

Similarly there are plenty of such wierd stuffz about windows which are still unanswered.

17
Jun
09

Blank cd

There is a blank cd. You are given two colours of paint, say black and white . A sensor can recognize the colour painted on the disc and produce an output. Paint the disc in a way such that you can find the direction of rotation by looking at the output.

Please try to solve this problem.If not I’ll mail u guyz later.

17
Jun
09

Red balls & Green balls

Bag A has 10 Red balls and Bag B has 10 Green balls.

Shuffle bag A move three balls from A to B then
Shuffle bag B move three balls from B to A

Which bag is likely have more number of balls of other color.

Note: Solution is simple if u need help mail me.

15
Jun
09

Min & Max in an @rr@y

You have given an array. Find the maximum and minimum numbers in less number of comparisons.

Note : Its is quite simple for all to find in 2*n comparisons can u do it in less than 2*n comparisons?

Solution

15
Jun
09

Missing number

You have 1 to N-1 array and 1 to N numbers in it, and one number is missing, you need to find the missing number.

Note: Your algorithm should be of O(n) complexity and u r very nearer to the solution

Solution