There are 3 baskets of fruits with worng lables,one basket
has apple,another basket has orange,another has combination
of apple and orange,what is the least way of interchange
the lables.

Answer Posted / nitinbhatia2211

Lets Say Basket as B1, B2, B3 labelled Apple, Orange and
Apple&Orange respectively.
As all the Baskets have wrong labels, we are sure for one
thing that Basket B3 doesn't contain Apples&Orange So we
will first take out the fruit from it. Suppose its Apple
then surely B3 will get its real label i.e. Apple.
And as again we know that the all baskets were wrongly
labelled... interchange the labels of basket B2 and B1.

So finally we have B1, B2 and B3 containing Orange,
Apple&Orange and Apple respectively.

Therefore the least no of ways to find out the correct
labels is ONE only.

Is This Answer Correct ?    47 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.

1586


How can I check whether a file exists? I want to warn the user if a requested input file is missing.

652


Do pointers store the address of value or the actual value of a variable?

604


What are c identifiers?

621


What are run-time errors?

594






What extern c means?

529


What is the difference between exit() and _exit() function?

598


What is pass by reference in functions?

318


a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none

712


What is a newline escape sequence?

663


What are static variables in c?

624


Can a variable be both static and volatile in c?

603


Explain bitwise shift operators?

627


When do we get logical errors?

633


What is the stack in c?

714