There are 8 billiard balls, and one of them is slightly
heavier, but the only way to tell was by putting it on a
weighing scale against another. What's the fewest number of
times you'd have to use the scale to find the heavier ball?
Answers were Sorted based on User's Feedback
Answer / mahesh t
first take 6 balls from 8 balls
from those 6 divide 3 and 3 check it in weighing scale if it
equals weight remaining 2 balls and you get the hevier
ball....of not equals take the 3 balls which is hevier from
those weighing with 6 balls then take 2 balls from those 3
balls and weight if equals the remaining one is hevier
and final you can know the hevier ball within 2 times
| Is This Answer Correct ? | 8 Yes | 0 No |
What is function prototype?
How do we select the big element or any other operation from array which is read dynamically. user need to give the elements only no need to mention the size.
write an algorithm and a program to count the number of elements in a circularly singly linked list
char S; char S[6]= " HELLO"; printf("%s ",S[6]); output of the above program ? (0, ASCII 0, I,unpredictable)
When is a void pointer used?
Write a C++ program without using any loop (if, for, while etc) to print numbers from 1 to 100 and 100 to 1;
18 Answers Accenture, Cisco, Egentec, HCL, Ideaz, Infosys, M-Systems, MYR, TCS,
#include<stdio.h> int main() { int i=2; int j=++i + ++i + i++; printf("%d\n",i); printf("%d\n",j); }
What is a pointer?
main() { int a = 65; printf(“%d %o %x”,a,a,a); } Output 65 101 41 Please explain me.How it is coming like that?
main difference between c and c++ language
we all know about the function overloading concept used in C++ and we all learnt abt that.... but that concept is already came in C in a very smaller propotion ... my question is IN WHICH CONCEPT THERE IS A USE OF FUNCTION OVERLOADING IS USED in C language?????????????
Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?