we have a 3litres jug and a 5 litres jug and no measures on
them. using these two jugs how can we measure 4 litres of water?
Answers were Sorted based on User's Feedback
Answer / money
we have 3 liter jug and 5 lit..
first 5 liter with full water.and drop water into 3 liter
jug. remain 2 liter water in 5 liter capcity jug.
step 2 : drop 3 liter water in another container.
3 liter jug is empty and after then 2 liter from 5
liter jug into 3 liter jug. now we have 2 liter water in 3
liter capicity jug and 5 liter jug is empty.
step 3: take water with full 5 liter jug. pour the one liter
into 3 liter jug which have already two liter .u will have 4
liter in 5 liter jug cacpity.
| Is This Answer Correct ? | 25 Yes | 3 No |
Answer / gowthaman
take a 10 lits water by two times on the 5 lit jug and put on some intermediate,then u r having 3 lit jug so u cud pour the 6 LIT wATER FROM INTERMEDIATE by measuring it two times and now ur having 4 lit water
| Is This Answer Correct ? | 0 Yes | 1 No |
What are structure members?
Example of friendly function in c++
wat is the output #define VOLEDEMORT _who_must_not_be_named int main() { printf("VOLEDEMORT"); }
How do you use a 'Local Block'?
how to reverse string "Hello World" by using pointers only. Without any temp var
int a=0,b=2; if (a=0) b=0; else b=*10; What is the value of b ?
main() { unsigned int k = 987 , i = 0; char trans[10]; do { trans[i++] =(char) (k%16 > 9 ? k%16 - 10 + 'a' : '\0' ); } while(k /= 16); printf("%s\n", trans); }
What are function pointers? Provide an example.
What is a function in c?
#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }
What do header files do?
What will be the result of the following program? char*g() { static char x[1024]; return x; } main() { char*g1="First String"; strcpy(g(),g1); g1=g(); strcpy(g1,"Second String"); printf("Answer is:%s", g()); } (A) Answer is: First String (B) Answer is: Second String (C) Run time Error/Core Dump (D) None of these