Re: [algogeeks] A SIMPLE C++ PROGRAM.
This is compiler dependent..and not a portable way of writing code On Sat, Apr 30, 2011 at 12:11 PM, Ashish Modi wrote: > For such type of questions, the best method is to draw a parse > tree according to precedence and evaluate the tree. This is how it is > evaluated at compiler level. Many times parsing tree creation is > implementation dependent. > > > > > > > On Fri, Apr 29, 2011 at 6:43 PM, Varun Nagpal wrote: > >> I think these questions are stupid in the sense that no one would ever use >> these constructs in their production code unless someone wants to write an >> obscure obfuscated code in some competition. Many times similar expressions >> are non-portable. >> >> Anyways, to understand this and related concepts, please see iso c or c++ >> standard and try to understand operator precedence, operator associativity >> and sequence points. >> >> On Fri, Apr 29, 2011 at 3:06 PM, Nikhil Gupta >> wrote: >> >>> 12 >>> 5 >>> >>> because y=4+4+3+1 >>> and x is incremented to 5 >>> >>> >>> On Fri, Apr 29, 2011 at 2:01 PM, MANNU wrote: >>> *Can anyone please explain me the output of this program:* int x=1; int y=x++ + ++x + ++x + x++; cout<>>> cout<>>> -- 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. >>> >>> >>> >>> -- >>> Nikhil Gupta >>> Senior Co-ordinator, Publicity >>> CSI, NSIT Students' Branch >>> NSIT, New Delhi, India >>> >>> -- >>> 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. >> > > > > -- > With Regards > Ashish Modi > 9423721478 > > > -- > 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. > -- Amit Jaspal. Men do less than they ought, unless they do all they can -- 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] If anyone have this book please mail me Thanks in advance
Please refrain from sharing such links and engaging in piracy. I kindly request the admin of this forum to delete all such posts and to warn the users on the forum for possible barring in case they are found to use this forum for piracy and malpractices. On Sat, Apr 30, 2011 at 12:09 PM, Charles Turner wrote: > This doesn't look legal to me. Has the author allowed you to redistribute > their book? I can't see any such evidence. > > If you don't have permission to redistribute the book, you're breaking the > law. This is a serious offence. You are lowering the reputation of this > list. > > > -- > 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: Do you Think Allocating memory to 2D Array is easy ???
pptr = (char **) malloc (sizeof(char *) * ROW_MAX); ptr = (char *) malloc(sizeof(char) * row * col); for (index = 0; index < ROW_MAX; index++) { pptr[index] = ptr+index; ptr = ptr + ROW_MAX; } How about doing like above ?, you want only with one malloc ? Thanks, Sathaiah On Sun, May 1, 2011 at 11:47 PM, hary rathor wrote: > @harshit this not correct way . you will get segmentation fault while > accessing the element .. > you can see in book pointer in c > > -- > 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] A SIMPLE QUESTION
I have "n" boxes each with "m" candys, I want distributed these candys among "k" students what is the best way for distribute them such that 1. All students get equal number of candies. 2. All the candies which a student get must be from a single box only. -- 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] A SIMPLE C++ PROGRAM.
The above code is purely compiler dependent.Google Sequence Points. -- 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] A SIMPLE C++ PROGRAM.
Well, It depends on the compiler you are using. This code with multiple increments and decrements in one expression, is *invalid* code per ISO 14882:2003 paragraph 5.4, As with any invalid code, the compilers can do print any value, if they choose to let this compile. It's also invalid C per ISO 9899:1999 paragraph 6.5.2. For Ex: x = 2; y = x++ + ++x + ++x + x++ +++x; Answer may be: Compiler y gcc 4.4.3 on Linux produces 19 Sun C++ 5.8 on Solaris for sparc produces 28 C compiler on Unix 7 for PDP-11 produces 25 -- 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] Bubble-sort with Hungarian ("Csángó") folk dance
On 01/05/2011 19:42, Arun Bala G wrote: Guys, Check this out Top of Form Bottom of Form *Bubble-sort with Hungarian ("Csángó") folk dance * http://youtu.be/lyZQPjUT5B4 That made my day! Thank you for sharing :D. Charles -- 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] Bubble-sort with Hungarian ("Csángó") folk dance
Guys, Check this out Top of Form Bottom of Form Bubble-sort with Hungarian ("Csángó") folk dance http://youtu.be/lyZQPjUT5B4 -- 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] A SIMPLE C++ PROGRAM.
x=5 y=10 -- 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: Do you Think Allocating memory to 2D Array is easy ???
@harshit this not correct way . you will get segmentation fault while accessing the element .. you can see in book pointer in c -- 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] problem regarding gcc installation
type on terminal " sudo apt-get install gcc" you will get latest gcc automatically -- 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] Online Jobs for students
Online Jobs for students Online Typing Work from Home No Age Limit | Easy Application http://bit.ly/AsianEdu 2 years Masters Program Gulf Medical University UAE http://bit.ly/AsianEdu Over 5,000 jobs available in Australia. Visa assistance available. http://bit.ly/AsianEdu -- 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] Popular Puzzle of the week
Hi, Based on most comments, The popular puzzle of the last week is * http://dailybrainteaser.blogspot.com/2011/04/humor-quiz-25april.html?lavesh=lavesh * *Please subscribe and follow this blog to show your liking to the blog.* -- "Never explain yourself. Your friends don’t need it and your enemies won’t believe it" . -- 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.