Re: [algogeeks] A logical Question

2011-10-29 Thread Rohit Srivastava
remains same On Sat, Oct 29, 2011 at 12:21 PM, praveen raj praveen0...@gmail.com wrote: amount displaced by (boat +man + suitcase) = amount displaced by (boat+man) + amount displaced by suitcase therefore no change of level... With regards, Praveen Raj DCE-IT 3rd yr 735993

Re: [algogeeks] Re: Syllogism

2011-08-22 Thread Rohit Srivastava
no some girls may not be beautiful or all of them may be beautiful based on your premise the conclusion is incorrect since you havent spoken about the rest of the girls so you dont know nething about them On Mon, Aug 22, 2011 at 1:12 PM, Apoorve Mohan apoorvemo...@gmail.comwrote: U cannot say

Re: [algogeeks] Re: Number theory

2011-08-17 Thread Rohit Srivastava
+1 to nitin On Wed, Aug 17, 2011 at 2:48 PM, Vijay Kansal vijaykans...@gmail.comwrote: my bad 2^(n-1)... On Aug 17, 2:17 pm, Vijay Kansal vijaykans...@gmail.com wrote: @nitin it must be 2^n i think On Aug 17, 3:48 am, Bharat Kul Ratan bharat.kra...@gmail.com wrote: It

Re: [algogeeks] GS apti ques!

2011-08-17 Thread Rohit Srivastava
0.788 On Wed, Aug 17, 2011 at 5:23 PM, priya ramesh love.for.programm...@gmail.com wrote: A mistake from my side as well! Got 78.8% :) -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] De shaw ques!

2011-08-17 Thread Rohit Srivastava
+1 to nitin On Wed, Aug 17, 2011 at 6:02 PM, Romil ... vamosro...@gmail.com wrote: People this is not the way to approach this one. This question seems to be unfair. Take the number to be 1939 which also leaves 69 as the remainder when divided by 935 but when it is divided by 38, the

Re: [algogeeks] an amazing amazon question!

2011-08-17 Thread Rohit Srivastava
logic plz? On Wed, Aug 17, 2011 at 10:35 PM, sagar pareek sagarpar...@gmail.comwrote: 16, 61, 106 average speed is 45 miles/hour On Wed, Aug 17, 2011 at 10:28 PM, priya ramesh love.for.programm...@gmail.com wrote: A car is traveling at a uniform speed.The driver sees a milestone showing

Re: [algogeeks] String Doubt

2011-08-13 Thread Rohit Srivastava
2. On Sat, Aug 13, 2011 at 7:24 PM, Raman raman.u...@gmail.com wrote: Which of the following statements are correct about the below declarations? *char *p = Sanjay; char a[] = Sanjay;*1:There is no difference in the declarations and both serve the same purpose.2:*p* is a non-const pointer

Re: [algogeeks] String Doubt

2011-08-13 Thread Rohit Srivastava
also 3,4 On Sat, Aug 13, 2011 at 7:30 PM, Rohit Srivastava access2ro...@gmail.comwrote: 2. On Sat, Aug 13, 2011 at 7:24 PM, Raman raman.u...@gmail.com wrote: Which of the following statements are correct about the below declarations? *char *p = Sanjay; char a[] = Sanjay;* 1

Re: [algogeeks] String Doubt

2011-08-13 Thread Rohit Srivastava
my bad only 3,4 On Sat, Aug 13, 2011 at 7:41 PM, rajeev bharshetty rajeevr...@gmail.comwrote: 3,4 On Sat, Aug 13, 2011 at 7:39 PM, Raman raman.u...@gmail.com wrote: In statement 2, isn't p pointing to const string, as we cannot modify the characters of the string. -- You received this

[algogeeks] output help

2011-08-09 Thread Rohit Srivastava
#includestdio.h #includeconio.h int main() { struct value { int bit1:1; int bit3:4; int bit4:4; }bit={1,2,2}; printf(%d %d %d\n,bit.bit1,bit.bit3,bit.bit4); getche(); return 0; } the above code gives output : -1 2 2 any idea why??? -- You

Re: [algogeeks] output help

2011-08-09 Thread Rohit Srivastava
, output will be -2 2) unsigned int bit3:2, output will be 2. I hope it is cleared now On 8/9/11, Rohit Srivastava access2ro...@gmail.com wrote: #includestdio.h #includeconio.h int main() { struct value { int bit1:1; int bit3:4; int bit4:4

Re: [algogeeks] Doubts

2011-08-09 Thread Rohit Srivastava
@aditi did they mention any thing about miss penalty also in the question ?? On Tue, Aug 9, 2011 at 11:48 AM, aditi garg aditi.garg.6...@gmail.comwrote: @aditya and dipankar: the ans given ws 500ns that is why i posted dis ques...i ws getting the same ans... On Tue, Aug 9, 2011 at 9:45 AM,

Re: [algogeeks] Doubts

2011-08-09 Thread Rohit Srivastava
, Rohit Srivastava access2ro...@gmail.comwrote: @aditi did they mention any thing about miss penalty also in the question ?? On Tue, Aug 9, 2011 at 11:48 AM, aditi gayrg aditi.garg.6...@gmail.comwrote: @aditya and dipankar: the ans given ws 500ns that is why i posted dis ques...i ws

Re: [algogeeks] problem regarding output??

2011-08-09 Thread Rohit Srivastava
typecast only temporarily changes the pointer type of LHS but cannot change that of RHS or even LHS permanently On Tue, Aug 9, 2011 at 5:36 PM, ankit sambyal ankitsamb...@gmail.comwrote: The typecasting tells the compiler that the void pointer is now pointing to an integer and when we use this

Re: [algogeeks] Re: Doubts

2011-08-09 Thread Rohit Srivastava
@aditi since in the hierarchy m1 comes first so if it is a hit then we dont need to check m2 but in case of a miss 0.03*2 seconds are wasted while searching in m1 then that value is looked for in m2 so i suppose the best answer is given by rohit jain. unless there is some missing data On Tue, Aug

Re: [algogeeks] MS question

2011-08-09 Thread Rohit Srivastava
google on RLE (run length encoding) its almost similar!! On Tue, Aug 9, 2011 at 6:46 PM, ankit sambyal ankitsamb...@gmail.comwrote: @raghavan: ur approach uses O(n) space -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this

Re: [algogeeks] c question!

2011-08-09 Thread Rohit Srivastava
yep it will !! any ways nodeptr is another name for pointer to the same structure so you dont need to write structname *nodeptr you can simply write nodeptr *p(say) to declare pointer to the structure On Tue, Aug 9, 2011 at 8:09 PM, rohit jangid rohit.nsi...@gmail.com wrote: it will give error

Re: [algogeeks] c question!

2011-08-09 Thread Rohit Srivastava
dont use *h just use h On Tue, Aug 9, 2011 at 8:31 PM, siddharth srivastava akssps...@gmail.comwrote: Hi On 9 August 2011 20:26, programming love love.for.programm...@gmail.comwrote: #includestdio.htypedef struct {char * a; }*nodeptr; main(){nodeptr *h;h-a=programming;printf(hi %s\n,

Re: [algogeeks] Question

2011-08-05 Thread Rohit Srivastava
you might get error: floating pointing formats not linked!! but thats obsolete! I don't compiler these days will give such an error otherwise code written by Dipankar will solve ur problem if u r unable to take multi-word input On Fri, Aug 5, 2011 at 7:24 PM, Dipankar Patro dip10c...@gmail.com

Re: [algogeeks] Question

2011-08-05 Thread Rohit Srivastava
which compiler are u using ? On Fri, Aug 5, 2011 at 7:29 PM, Vijay Khandar vijaykhand...@gmail.comwrote: I include this fn linkfloat(), Now my program working properlybut why we have to include this fn externally plz explain. On Fri, Aug 5, 2011 at 6:07 PM, SANDEEP CHUGH

Re: [algogeeks] Question

2011-08-05 Thread Rohit Srivastava
compiler Turbo C++ On Fri, Aug 5, 2011 at 7:34 PM, Rohit Srivastava access2ro...@gmail.comwrote: you might get error: floating pointing formats not linked!! but thats obsolete! I don't compiler these days will give such an error otherwise code written by Dipankar will solve ur problem if u r

Re: [algogeeks] Re: self referential struct. Contd.

2011-07-29 Thread Rohit Srivastava
padding based on the bit interleaving(low order) which is basically hardware dependent. On Fri, Jul 29, 2011 at 10:10 PM, Puneet Gautam puneet.nsi...@gmail.comwrote: Thanks guys...so much...!! On 7/29/11, nullpointer nullpointer...@gmail.com wrote: #includestdio.h #includeconio.h struc

Re: [algogeeks] Re: C output

2011-07-28 Thread Rohit Srivastava
no error in dev c++. On Thu, Jul 28, 2011 at 2:43 PM, Piyush Kapoor pkjee2...@gmail.com wrote: It is not showing compiler error on Codeblocks on my machine. On Thu, Jul 28, 2011 at 2:26 PM, prabhat prabhat0...@gmail.com wrote: i think there will be warning due to inner structure is