plz tell me the solution..........

in c language program guess any one number from 1 to 50 and
tell that number within 8 asking question in yes or
no...............

Answers were Sorted based on User's Feedback



plz tell me the solution.......... in c language program guess any one number from 1 to 50 and ..

Answer / danish

he ask for 8 question
so it can be any 8 question ,
now use divide -conquer apprach to solve this problem as
Is it number <= 25
then, again split the range and within 8 question you can solve question......

GOOD BYE

Is This Answer Correct ?    5 Yes 0 No

plz tell me the solution.......... in c language program guess any one number from 1 to 50 and ..

Answer / abhisai

yes we can know it easily

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More C Code Interview Questions

what is oop?

3 Answers  


main() { int i; clrscr(); printf("%d", &i)+1; scanf("%d", i)-1; } a. Runtime error. b. Runtime error. Access violation. c. Compile error. Illegal syntax d. None of the above

1 Answers   HCL,


How to count a sum, when the numbers are read from stdin and stored into a structure?

1 Answers  


Give a one-line C expression to test whether a number is a power of 2.

10 Answers   Microsoft,


#include<stdio.h> main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p + ++*str1-32); }

2 Answers   CNSI,






write the function. if all the character in string B appear in string A, return true, otherwise return false.

11 Answers   Google,


What is the problem with the following code segment? while ((fgets(receiving array,50,file_ptr)) != EOF) ;

1 Answers  


void main() { static int i; while(i<=10) (i>2)?i++:i--; printf(ā€œ%dā€, i); }

2 Answers  


PROG. TO PRODUCE 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1

1 Answers  


Display the time of the system and display the right time of the other country

1 Answers  


#include<stdio.h> main() { const int i=4; float j; j = ++i; printf("%d %f", i,++j); }

1 Answers  


plz tell me the solution.......... in c language program guess any one number from 1 to 50 and tell that number within 8 asking question in yes or no...............

2 Answers   Wipro,


Categories