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
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 |
Write a C program to print look and say sequence? For example if u get the input as 1 then the sequence is 11 21 1211 111221 312211 12112221 .......(it counts the no. of 1s,2s etc which is in successive order) and this sequence is used in run-length encoding.
How can you relate the function with the structure? Explain with an appropriate example.
write a c-program to display the time using FOR loop
void main() { void *v; int integer=2; int *i=&integer; v=i; printf("%d",(int*)*v); }
Is the following code legal? void main() { typedef struct a aType; aType someVariable; struct a { int x; aType *b; }; }
How will u find whether a linked list has a loop or not?
#include<stdio.h> void fun(int); int main() { int a; a=3; fun(a); printf("\n"); return 0; } void fun(int i) { if(n>0) { fun(--n); printf("%d",n); fun(--n); } } the answer is 0 1 2 0..someone explain how the code is executed..?
There is a lucky draw held every day. if there is a winning number eg 1876,then all possible numbers like 1867,1687,1768 etc are the numbers that match irrespective of the position of the digit. Thus all these numbers qualify fr the lucky draw prize Assume there is no zero digit in any numbers. write a program to show all the possible winning numbers if a "winning number"is passed as an arguments to the function.
void main() { if(~0 == (unsigned int)-1) printf(“You can answer this if you know how values are represented in memory”); }
How to count a sum, when the numbers are read from stdin and stored into a structure?
What is your nationality?
1. const char *a; 2. char* const a; 3. char const *a; -Differentiate the above declarations.