Re: [algogeeks] Enter in the loop challenge
@vijay nice thought. but actually the while loop has changed because of addition of label in it. another possible answer could be write a cout hello; statement above the main but the problem given was enter into the loop without changing the loop. On Wed, Sep 5, 2012 at 10:09 PM, SHOBHIT GUPTA shobhitgupta1...@gmail.comwrote: also the keywords like int , long etc cannot be included in macro On Wed, Sep 5, 2012 at 7:01 PM, Shashank Jain shashank29j...@gmail.comwrote: thanks that was a really nice explanation shashank On Wed, Sep 5, 2012 at 6:48 PM, Bala cmb...@gmail.com wrote: Source: http://gcc.gnu.org/onlinedocs/cpp/Macros.html You may define any valid identifier as a macro, even if it is a C keyword. The preprocessor does not know anything about keywords. This can be useful if you wish to hide a keyword such as const from an older compiler that does not understand it. However, the preprocessor operator defined (see Defined) can never be defined as a macro, and C++'s named operators (see C++ Named Operators) cannot be macros when you are compiling C++. Cheers, -Bala “Judge nothing, be happy. Forgive everything, be happier. Love everything, be happiest.” ~Sri Chinmoy On Wed, Sep 5, 2012 at 8:12 AM, Shashank Jain shashank29j...@gmail.com wrote: can you plz explain how it happens ...as valid macro names must not be key words. On Wed, Sep 5, 2012 at 6:24 PM, Shashank Jain shashank29j...@gmail.com wrote: it works thanks for your reply On Wed, Sep 5, 2012 at 6:19 PM, Bala cmb...@gmail.com wrote: #define while(x) while(1) Cheers, -Bala On Wed, Sep 5, 2012 at 7:45 AM, Shashank Jain shashank29j...@gmail.com wrote: Here is a question...and i am badly stuck at it how would you get into the loop int main() { while ( 0) { printf(hello); } return 0; } You cannot change the while loop and its condition and you have to print hello -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Enter in the loop challenge
Here is a question...and i am badly stuck at it how would you get into the loop int main() { while ( 0) { printf(hello); } return 0; } You cannot change the while loop and its condition and you have to print hello -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Enter in the loop challenge
it works thanks for your reply On Wed, Sep 5, 2012 at 6:19 PM, Bala cmb...@gmail.com wrote: #define while(x) while(1) Cheers, -Bala On Wed, Sep 5, 2012 at 7:45 AM, Shashank Jain shashank29j...@gmail.com wrote: Here is a question...and i am badly stuck at it how would you get into the loop int main() { while ( 0) { printf(hello); } return 0; } You cannot change the while loop and its condition and you have to print hello -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Enter in the loop challenge
thanks that was a really nice explanation shashank On Wed, Sep 5, 2012 at 6:48 PM, Bala cmb...@gmail.com wrote: Source: http://gcc.gnu.org/onlinedocs/cpp/Macros.html You may define any valid identifier as a macro, even if it is a C keyword. The preprocessor does not know anything about keywords. This can be useful if you wish to hide a keyword such as const from an older compiler that does not understand it. However, the preprocessor operator defined (see Defined) can never be defined as a macro, and C++'s named operators (see C++ Named Operators) cannot be macros when you are compiling C++. Cheers, -Bala “Judge nothing, be happy. Forgive everything, be happier. Love everything, be happiest.” ~Sri Chinmoy On Wed, Sep 5, 2012 at 8:12 AM, Shashank Jain shashank29j...@gmail.com wrote: can you plz explain how it happens ...as valid macro names must not be key words. On Wed, Sep 5, 2012 at 6:24 PM, Shashank Jain shashank29j...@gmail.com wrote: it works thanks for your reply On Wed, Sep 5, 2012 at 6:19 PM, Bala cmb...@gmail.com wrote: #define while(x) while(1) Cheers, -Bala On Wed, Sep 5, 2012 at 7:45 AM, Shashank Jain shashank29j...@gmail.com wrote: Here is a question...and i am badly stuck at it how would you get into the loop int main() { while ( 0) { printf(hello); } return 0; } You cannot change the while loop and its condition and you have to print hello -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] RBS intern
Hi, RBS is coming for internship. How do I prepare fr it, in terms of the topics asked, In terms of the no. of rounds, whether there is a GD or not? FYI - they hv already taken e-litmus test fr the interns as well (I hv a good score). Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Complexity
I need to study both space and time complexities. What is the best source? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Re: whats d problem wid using gets?
@don - how is fgets invoked coz u said we can limit the characters? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Sun, Sep 4, 2011 at 3:56 PM, bharatkumar bagana bagana.bharatku...@gmail.com wrote: gets is deprecated ... that's why gcc gives warning... On Sun, Sep 4, 2011 at 12:46 AM, sukran dhawan sukrandha...@gmail.comwrote: ya +1 to anup.tats why when u use gets() in gcc i reports a warning On Sun, Sep 4, 2011 at 8:40 AM, Anup Ghatage ghat...@gmail.com wrote: I had once read somewhere that they had used gets() during the first compilations of unix, and it used to always crash for some test cases. So after that they stopped using it and alerted everyone of the problem.. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- **Please do not print this e-mail until urgent requirement. Go Green!! Save Papers = Save Trees *BharatKumar Bagana* **http://www.google.com/profiles/bagana.bharatkumarhttp://www.google.com/profiles/bagana.bharatkumar * Mobile +91 8056127652* bagana.bharatku...@gmail.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] whats d problem wid using gets?
Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks]
no ppl miss out on hr rounds too! its d compiler which determines variable size! Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Thu, Aug 11, 2011 at 4:35 PM, sukran dhawan sukrandha...@gmail.comwrote: how to determine whether the machine is a 32 bit or 64 bit using a c program? is it by sizeof(int) * 4? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] aptitude
what is the best book for aptitude questions? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] aptitude
what's the book name plz? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Wed, Aug 10, 2011 at 6:41 PM, Pratz mary pratima.m...@gmail.com wrote: rs aggarwal On 10 August 2011 18:32, Shashank Jain shashan...@gmail.com wrote: what is the best book for aptitude questions? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- regards Pratima :) -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] shift left nd right
thx dipankar, its a gud 1! Bt tell me wat does '' and '' operators do? eg: 202 = 1 can u explain nd wat is this operator called? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Mon, Aug 8, 2011 at 12:54 AM, Dipankar Patro dip10c...@gmail.com wrote: This link I think is a good one: http://msdn.microsoft.com/en-us/library/336xbhcz.aspx On 8 August 2011 00:37, Shashank Jain shashan...@gmail.com wrote: plz sum1 explain me shift left nd shift right operators? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- ___ Please do not print this e-mail until urgent requirement. Go Green!! Save Papers = Save Trees -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] shift left nd right
int b; b=22; printf(%f, b); output: 0.00 plz tell y is dat so? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Mon, Aug 8, 2011 at 10:24 PM, Gaurav Menghani gaurav.mengh...@gmail.comwrote: http://lmgtfy.com/?q=Bitwise+left+and+right+shift+operators On Mon, Aug 8, 2011 at 10:20 PM, Shashank Jain shashan...@gmail.com wrote: thx dipankar, its a gud 1! Bt tell me wat does '' and '' operators do? eg: 202 = 1 can u explain nd wat is this operator called? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Mon, Aug 8, 2011 at 12:54 AM, Dipankar Patro dip10c...@gmail.com wrote: This link I think is a good one: http://msdn.microsoft.com/en-us/library/336xbhcz.aspx On 8 August 2011 00:37, Shashank Jain shashan...@gmail.com wrote: plz sum1 explain me shift left nd shift right operators? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- ___ Please do not print this e-mail until urgent requirement. Go Green!! Save Papers = Save Trees -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Gaurav Menghani -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] shift left nd right
oh yeah, thx karthik. Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Mon, Aug 8, 2011 at 10:29 PM, Shashank Jain shashan...@gmail.com wrote: int b; b=22; printf(%f, b); output: 0.00 plz tell y is dat so? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Mon, Aug 8, 2011 at 10:24 PM, Gaurav Menghani gaurav.mengh...@gmail.com wrote: http://lmgtfy.com/?q=Bitwise+left+and+right+shift+operators On Mon, Aug 8, 2011 at 10:20 PM, Shashank Jain shashan...@gmail.com wrote: thx dipankar, its a gud 1! Bt tell me wat does '' and '' operators do? eg: 202 = 1 can u explain nd wat is this operator called? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Mon, Aug 8, 2011 at 12:54 AM, Dipankar Patro dip10c...@gmail.com wrote: This link I think is a good one: http://msdn.microsoft.com/en-us/library/336xbhcz.aspx On 8 August 2011 00:37, Shashank Jain shashan...@gmail.com wrote: plz sum1 explain me shift left nd shift right operators? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- ___ Please do not print this e-mail until urgent requirement. Go Green!! Save Papers = Save Trees -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Gaurav Menghani -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Re: GS on campus
what kind of puzzles? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Sun, Aug 7, 2011 at 12:34 PM, saurabh singh saurab...@gmail.com wrote: I said also,.that is during the interviews puzzles were asked I am telling the experiences of my friends.I was out in round 1/ On Sun, Aug 7, 2011 at 10:32 AM, arvind kumar arvindk...@gmail.comwrote: @saurabh:wen wer the 5 rounds of puzzles asked??during interview? On Sun, Aug 7, 2011 at 8:23 AM, saurabh singh saurab...@gmail.comwrote: Its lot of apti and damn easy c in technichal part,The paper was of 45 min duration in which we had to do 35 questions(25 apti 10 tech),It was followed by a group discussion on social networking.Then interviews.5 rounds puzzles were also asked.Most of them were standard puzzles.. On Sun, Aug 7, 2011 at 1:08 AM, Jyoti Gupta 2006gu...@gmail.com wrote: no questions~ yet!!! On 7 August 2011 00:45, Nitish Garg nitishgarg1...@gmail.com wrote: I was just telling not to post the schedule, posting questions was never the problem. :) On Sun, Aug 7, 2011 at 12:42 AM, gaurav kumar mailmea...@gmail.comwrote: @nitish i agree to your point of college policy. But think of the support/help which we can get through u guys in advance for a particular company. even u people of dce also need this . I request u to post as much questions of interview/written on this platform. it is really helpful. On Aug 7, 12:04 am, Nitish Garg nitishgarg1...@gmail.com wrote: It's against the Placement Policy to post the schedule of the companies visiting DCE. I am not against sharing the knowledge, its just that we should follow some rules related to the college. On Sun, Aug 7, 2011 at 12:30 AM, arvind kumar arvindk...@gmail.com wrote: @nitish:wats wrong in doing so?the whole point of a group is to share things..n this is not a thing thats not supposed to be shared. On Sun, Aug 7, 2011 at 12:26 AM, Nitish Garg nitishgarg1...@gmail.comwrote: @Shashank @Sameer Please do not post the schedule of the companies that are going to visit the campus. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/Y_phAxeBvnMJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Jyoti Gupta COE , 4th year Delhi College of Engineering -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Saurabh Singh B.Tech (Computer Science) MNNIT ALLAHABAD -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Saurabh Singh B.Tech (Computer Science) MNNIT ALLAHABAD -- You received this message because you are subscribed to the Google Groups
[algogeeks] Bitwise operators
bitwise complement operator (~), complements d digits of d input bt when i use it : int a,b; b=~a; output: its giving o/p such that b= -a-1; why is dat so? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Re: Bitwise operators
y r we taking 8 bit numbers, i mean dat way we cant go beyond -127 to 127? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Sun, Aug 7, 2011 at 5:39 PM, Yasir yasir@gmail.com wrote: let say a=6; binary= 0110 b = ~a = 1001 Now when you print value of ~a or b, it is calculating 2's complement. 1's complement: 0110 2's complement: 0111 (value = -7) Pls check signed bit representation for details. On Aug 7, 4:40 pm, Shashank Jain shashan...@gmail.com wrote: bitwise complement operator (~), complements d digits of d input bt when i use it : int a,b; b=~a; output: its giving o/p such that b= -a-1; why is dat so? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Re: Bitwise operators
so tell me fr any bit representation, 1st bit is for sign only na? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Sun, Aug 7, 2011 at 6:03 PM, Yasir yasir@gmail.com wrote: 8 bit was taken just for example. It can be 16/32 bit but that won't make any difference on leading 0's or 1's. On Aug 7, 5:28 pm, Shashank Jain shashan...@gmail.com wrote: y r we taking 8 bit numbers, i mean dat way we cant go beyond -127 to 127? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Sun, Aug 7, 2011 at 5:39 PM, Yasir yasir@gmail.com wrote: let say a=6; binary= 0110 b = ~a = 1001 Now when you print value of ~a or b, it is calculating 2's complement. 1's complement: 0110 2's complement: 0111 (value = -7) Pls check signed bit representation for details. On Aug 7, 4:40 pm, Shashank Jain shashan...@gmail.com wrote: bitwise complement operator (~), complements d digits of d input bt when i use it : int a,b; b=~a; output: its giving o/p such that b= -a-1; why is dat so? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Re: Bitwise operators
nd moreover after 2's complement its 0111 which is 7 nd not -7. so how? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Sun, Aug 7, 2011 at 6:25 PM, Shashank Jain shashan...@gmail.com wrote: so tell me fr any bit representation, 1st bit is for sign only na? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Sun, Aug 7, 2011 at 6:03 PM, Yasir yasir@gmail.com wrote: 8 bit was taken just for example. It can be 16/32 bit but that won't make any difference on leading 0's or 1's. On Aug 7, 5:28 pm, Shashank Jain shashan...@gmail.com wrote: y r we taking 8 bit numbers, i mean dat way we cant go beyond -127 to 127? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Sun, Aug 7, 2011 at 5:39 PM, Yasir yasir@gmail.com wrote: let say a=6; binary= 0110 b = ~a = 1001 Now when you print value of ~a or b, it is calculating 2's complement. 1's complement: 0110 2's complement: 0111 (value = -7) Pls check signed bit representation for details. On Aug 7, 4:40 pm, Shashank Jain shashan...@gmail.com wrote: bitwise complement operator (~), complements d digits of d input bt when i use it : int a,b; b=~a; output: its giving o/p such that b= -a-1; why is dat so? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Re: Bitwise operators
ok, i get it now. so like for n bit representation, we can use only (n-1) bits for values nd 1 is fr sign. is everything in c stored in binary? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Sun, Aug 7, 2011 at 8:19 PM, Yasir yasir@gmail.com wrote: @Shashank, You didn't get it properly. If leftmost bit *0*, then it is a *+ve* number. If it's *1* then it's a *-ve* number. Let's take above example with 16 bit: a=6 binary: 0110 (note that leftmost bit is 0, so it's +ve number) ~a= 1001 (now leftmost bit is 1, so compiler will treat it as -ve number.) To obtain its *-ve decimal value* you need to calculate it's 2's complement. (note that the value obtained with 2's comlement would be - ve). Also you can cross verify that ~a represented above is -7. Simple math -7 +7 =0; 1001 0111 -- 0 Kindly, check out following link for more details on 2's complement: http://academic.evergreen.edu/projects/biophysics/technotes/program/2s_comp.htm Thanks, Yasir On Aug 7, 6:01 pm, Shashank Jain shashan...@gmail.com wrote: nd moreover after 2's complement its 0111 which is 7 nd not -7. so how? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Sun, Aug 7, 2011 at 6:25 PM, Shashank Jain shashan...@gmail.com wrote: so tell me fr any bit representation, 1st bit is for sign only na? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Sun, Aug 7, 2011 at 6:03 PM, Yasir yasir@gmail.com wrote: 8 bit was taken just for example. It can be 16/32 bit but that won't make any difference on leading 0's or 1's. On Aug 7, 5:28 pm, Shashank Jain shashan...@gmail.com wrote: y r we taking 8 bit numbers, i mean dat way we cant go beyond -127 to 127? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Sun, Aug 7, 2011 at 5:39 PM, Yasir yasir@gmail.com wrote: let say a=6; binary= 0110 b = ~a = 1001 Now when you print value of ~a or b, it is calculating 2's complement. 1's complement: 0110 2's complement: 0111 (value = -7) Pls check signed bit representation for details. On Aug 7, 4:40 pm, Shashank Jain shashan...@gmail.com wrote: bitwise complement operator (~), complements d digits of d input bt when i use it : int a,b; b=~a; output: its giving o/p such that b= -a-1; why is dat so? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] shift left nd right
plz sum1 explain me shift left nd shift right operators? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] GS on campus
10th aug Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Sat, Aug 6, 2011 at 6:37 PM, arvind kumar arvindk...@gmail.com wrote: @sameer:When is GS visitin ur coll?? On Sat, Aug 6, 2011 at 4:17 PM, sameer gupta sgsa...@gmail.com wrote: Delhi College Of Engg On Sat, Aug 6, 2011 at 4:12 PM, NIKHIL JAIN nikhil.jain.shali...@gmail.com wrote: which college -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] pointer size
dipankar, i hv 64 bit OS nd 32 bit compiler only since the ptr variable shows 4 bytes only. So how is dat possible acc. to what u said earlier? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Thu, Aug 4, 2011 at 7:33 PM, Ashish kumar Jain akjlucky4...@gmail.comwrote: Just check if you have installed DEV Cpp win32 installation or not.That will confirm the usage and observation.As per the Dev cpp page it is available in 32 bit exe only. On Thu, Aug 4, 2011 at 7:21 PM, Dipankar Patro dip10c...@gmail.comwrote: Also, you must remember that 64 OS can never run 32 bit Processors, since it will require a 64 bit CPU to produce a 64bit address format On 4 August 2011 19:19, Dipankar Patro dip10c...@gmail.com wrote: Yeah. On 4 August 2011 12:14, N1teesh nitee...@gmail.com wrote: So if either of the OS , Compiler , Processor are 32 Bit , then the size is bound to be 4 bytes? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/vsUrO_BCMXAJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- ___ Please do not print this e-mail until urgent requirement. Go Green!! Save Papers = Save Trees -- ___ Please do not print this e-mail until urgent requirement. Go Green!! Save Papers = Save Trees -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Regards, Ashish -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] pointer size
sorry i read it wrong. u are right! Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Sat, Aug 6, 2011 at 6:51 PM, Shashank Jain shashan...@gmail.com wrote: dipankar, i hv 64 bit OS nd 32 bit compiler only since the ptr variable shows 4 bytes only. So how is dat possible acc. to what u said earlier? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Thu, Aug 4, 2011 at 7:33 PM, Ashish kumar Jain akjlucky4...@gmail.comwrote: Just check if you have installed DEV Cpp win32 installation or not.That will confirm the usage and observation.As per the Dev cpp page it is available in 32 bit exe only. On Thu, Aug 4, 2011 at 7:21 PM, Dipankar Patro dip10c...@gmail.comwrote: Also, you must remember that 64 OS can never run 32 bit Processors, since it will require a 64 bit CPU to produce a 64bit address format On 4 August 2011 19:19, Dipankar Patro dip10c...@gmail.com wrote: Yeah. On 4 August 2011 12:14, N1teesh nitee...@gmail.com wrote: So if either of the OS , Compiler , Processor are 32 Bit , then the size is bound to be 4 bytes? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/vsUrO_BCMXAJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- ___ Please do not print this e-mail until urgent requirement. Go Green!! Save Papers = Save Trees -- ___ Please do not print this e-mail until urgent requirement. Go Green!! Save Papers = Save Trees -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Regards, Ashish -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] pointer size
*sizeof* is compiler and processor dependent for reasons of both architectural limitations and efficiency. Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Sat, Aug 6, 2011 at 6:52 PM, Shashank Jain shashan...@gmail.com wrote: sorry i read it wrong. u are right! Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Sat, Aug 6, 2011 at 6:51 PM, Shashank Jain shashan...@gmail.comwrote: dipankar, i hv 64 bit OS nd 32 bit compiler only since the ptr variable shows 4 bytes only. So how is dat possible acc. to what u said earlier? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Thu, Aug 4, 2011 at 7:33 PM, Ashish kumar Jain akjlucky4...@gmail.com wrote: Just check if you have installed DEV Cpp win32 installation or not.That will confirm the usage and observation.As per the Dev cpp page it is available in 32 bit exe only. On Thu, Aug 4, 2011 at 7:21 PM, Dipankar Patro dip10c...@gmail.comwrote: Also, you must remember that 64 OS can never run 32 bit Processors, since it will require a 64 bit CPU to produce a 64bit address format On 4 August 2011 19:19, Dipankar Patro dip10c...@gmail.com wrote: Yeah. On 4 August 2011 12:14, N1teesh nitee...@gmail.com wrote: So if either of the OS , Compiler , Processor are 32 Bit , then the size is bound to be 4 bytes? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/vsUrO_BCMXAJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- ___ Please do not print this e-mail until urgent requirement. Go Green!! Save Papers = Save Trees -- ___ Please do not print this e-mail until urgent requirement. Go Green!! Save Papers = Save Trees -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Regards, Ashish -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Re: output???
sagar - i dint get u, d code thing! Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Sat, Aug 6, 2011 at 2:31 AM, sagar pareek sagarpar...@gmail.com wrote: yup exactly On Sat, Aug 6, 2011 at 1:51 AM, Piyush Kapoor pkjee2...@gmail.com wrote: I think it is because the numbers like 0.7 do not have a exact binary representation,so they are not exactly represented in float,while the constant is internally implemented as double.,Read this:: http://www.topcoder.com/tc?module=Staticd1=tutorialsd2=integersReals -- *Regards,* *Piyush Kapoor,* *2nd year,CSE IT-BHU* -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- **Regards SAGAR PAREEK COMPUTER SCIENCE AND ENGINEERING NIT ALLAHABAD -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] difference between the two
i dont understand the diff btw dem, could u plz elaborate? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Sat, Aug 6, 2011 at 12:32 AM, Kamakshii Aggarwal kamakshi...@gmail.comwrote: in case of 64 bit, size of second structure will also be 16 not 8 On Fri, Aug 5, 2011 at 11:40 PM, UTKARSH SRIVASTAV usrivastav...@gmail.com wrote: I think voth are just same.. On Fri, Aug 5, 2011 at 10:57 AM, priya v pria@gmail.com wrote: in case of 64 bit machine y doesn't padding happen in the 2nd structure? On Fri, Aug 5, 2011 at 11:21 PM, hary rathor harry.rat...@gmail.comwrote: no ,if u r using 32 bit machine . that will use 4 byte pointer size , but in 64 machine that enforce to be size of 8 . where padding will take int your given first structure so for 32 bit- size will 8 8 for both structure for 64 bit - size will 16 and 12 respectively cause of 4 bit padding in one structure hence 2nd structure is good for use -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- *UTKARSH SRIVASTAV CSE-3 B-Tech 2nd Year @MNNIT ALLAHABAD* -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Regards, Kamakshi kamakshi...@gmail.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] pointer size
man this is too big of a page to go thru... so tell as both (OS nd pro) are 64 bit why is ptr size 4 bytes? nd also does it depend on all 3 : OS, processor, compiler ? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Thu, Aug 4, 2011 at 11:57 AM, Dipankar Patro dip10c...@gmail.com wrote: there absolutely nothing wrong in your interpretation. here is a link that might help : http://www.unix.org/whitepapers/64bit.html On 4 August 2011 11:18, Shashank Jain shashan...@gmail.com wrote: see dipankar, i hv 64 bit OS nd processor bt i dont know abt the compiler. nd yeah size of int is 4 bytes. so tell me where im interpreting wrong? Shashank Jain 3rd year, Computer Engg. Delhi College of Engineering On Thu, Aug 4, 2011 at 11:16 AM, Dipankar Patro dip10c...@gmail.comwrote: This has been a hot topic of discussion for a long time. But I found there are two things to look into it: 1. a 64 bit OS is one, which has 64 bit address handling capacity. and a 64bit processor is one which can perform operations on 64 bit data. A general concept that actually gets overlooked by many. Even I was confused with differences of 64 bit OS and Processors a while back. 2. if a compiler by it's own doesn't support 64 bit, it might be the case that even if you run on a 64 bit OS, size of int will be 4 bytes (32 bit). I think the best way to check out is to make a code on 64 bit compiler. If somebody has tried it please share the results. On 4 August 2011 10:38, Tushar Bindal tushicom...@gmail.com wrote: never assume that he compiler is same as the OS you run. it may be that you are running a 32-bit compiler I think pointers have size 4bytes on 8 byte compiler also - not sure. someone please correct me. On Thu, Aug 4, 2011 at 10:26 AM, Shashank Jain shashan...@gmail.comwrote: the size of a pointer is showing 4 bytes in my 64-bit OS, which should have been 8 bytes. Correct me where i am wrong? Shashank Jain 3rd year, Computer Engg. Delhi College of Engineering -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Tushar Bindal Computer Engineering Delhi College of Engineering Mob: +919818442705 E-Mail : tushicom...@gmail.com Website: www.jugadengg.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- ___ Please do not print this e-mail until urgent requirement. Go Green!! Save Papers = Save Trees -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- ___ Please do not print this e-mail until urgent requirement. Go Green!! Save Papers = Save Trees -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Re: Amazon Aptitude questions
whats the priority of ^ symbol? Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Thu, Aug 4, 2011 at 1:52 PM, Arun Vishwanathan aaron.nar...@gmail.comwrote: there are 12 black and 12 white socks p(bb)+p(ww) is what we want... p(bb)=12/24*11/23 p(ww)=12/24*11/23 so it is just 2*12/24*11/23=11/23 On Wed, Aug 3, 2011 at 9:08 PM, Prakash D cegprak...@gmail.com wrote: no.. it's really easy to find it out there are 12 black and 12 white pieces. let black =1 and white =0 the possible results are 11, 00, 10, 01 number of ways of 11 solutions= 12 * 11 = 132 number of ways of 00 solutions = 12 * 11 = 132 number of ways of 10 solutions = 12 * 12 = 144 number of ways of 01 solutions = 12 * 12 = 144 we need the prob of 10 + prob 01 == (144+144)/(132+ 132 + 144 + 144) =288/552 = 36/69 = 12/23 I think 11/23 is wrong -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Call by reference
@sandeep, i dint get what do you mean by simulate here, as in an example wud be gud. Shashank Jain Delhi College of Engineering On Wed, Aug 3, 2011 at 11:34 PM, Sandeep Jain sandeep6...@gmail.com wrote: I'd say C language is a truly call-by-value language. C++ supports call-by-reference. However in C we can simulate call-by-reference using pointers and address-of operator. Regards, Sandeep Jain On Wed, Aug 3, 2011 at 11:27 PM, NITIN SHARMA coolguyinat...@gmail.comwrote: As we say in C that we do call by reference but i thk call by reference is something different like we do through void pointer in c ++ but it should be call by address in C is it so? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] pointer size
the size of a pointer is showing 4 bytes in my 64-bit OS, which should have been 8 bytes. Correct me where i am wrong? Shashank Jain 3rd year, Computer Engg. Delhi College of Engineering -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] pointer size
tush, u hv ny idea dev c uses which compiler? Shashank Jain 3rd year, Computer Engg. Delhi College of Engineering On Thu, Aug 4, 2011 at 10:38 AM, Tushar Bindal tushicom...@gmail.comwrote: never assume that he compiler is same as the OS you run. it may be that you are running a 32-bit compiler I think pointers have size 4bytes on 8 byte compiler also - not sure. someone please correct me. On Thu, Aug 4, 2011 at 10:26 AM, Shashank Jain shashan...@gmail.comwrote: the size of a pointer is showing 4 bytes in my 64-bit OS, which should have been 8 bytes. Correct me where i am wrong? Shashank Jain 3rd year, Computer Engg. Delhi College of Engineering -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Tushar Bindal Computer Engineering Delhi College of Engineering Mob: +919818442705 E-Mail : tushicom...@gmail.com Website: www.jugadengg.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] pointer size
see dipankar, i hv 64 bit OS nd processor bt i dont know abt the compiler. nd yeah size of int is 4 bytes. so tell me where im interpreting wrong? Shashank Jain 3rd year, Computer Engg. Delhi College of Engineering On Thu, Aug 4, 2011 at 11:16 AM, Dipankar Patro dip10c...@gmail.com wrote: This has been a hot topic of discussion for a long time. But I found there are two things to look into it: 1. a 64 bit OS is one, which has 64 bit address handling capacity. and a 64bit processor is one which can perform operations on 64 bit data. A general concept that actually gets overlooked by many. Even I was confused with differences of 64 bit OS and Processors a while back. 2. if a compiler by it's own doesn't support 64 bit, it might be the case that even if you run on a 64 bit OS, size of int will be 4 bytes (32 bit). I think the best way to check out is to make a code on 64 bit compiler. If somebody has tried it please share the results. On 4 August 2011 10:38, Tushar Bindal tushicom...@gmail.com wrote: never assume that he compiler is same as the OS you run. it may be that you are running a 32-bit compiler I think pointers have size 4bytes on 8 byte compiler also - not sure. someone please correct me. On Thu, Aug 4, 2011 at 10:26 AM, Shashank Jain shashan...@gmail.comwrote: the size of a pointer is showing 4 bytes in my 64-bit OS, which should have been 8 bytes. Correct me where i am wrong? Shashank Jain 3rd year, Computer Engg. Delhi College of Engineering -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Tushar Bindal Computer Engineering Delhi College of Engineering Mob: +919818442705 E-Mail : tushicom...@gmail.com Website: www.jugadengg.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- ___ Please do not print this e-mail until urgent requirement. Go Green!! Save Papers = Save Trees -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Help on Recursion Bit Operators related problems
even this is a gud 1. http://www.cprogramming.com/tutorial/bitwise_operators.html Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Thu, Aug 4, 2011 at 1:35 AM, Samba Ganapavarapu sambasiv...@gmail.comwrote: thanks raj, is this the bitwise operator tutorial that you told about ? http://www.topcoder.com/tc?module=Staticd1=tutorialsd2=bitManipulation On Wed, Aug 3, 2011 at 3:48 PM, raj kumar megamonste...@gmail.com wrote: the best way to identify recursion is when finding solution to a problem consist of finding solution to a sub problem ex-5!=5*(4!)=5*4*(3!). for bits see topcoder tutorials on bitwise operators -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks]
we can use sortedset .Filling the array enteries in sortedset . as sorted set doesnt allow duplicate entries duplicate can be find out do its works??? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.