[algogeeks] Re: plz help
somebody try to execute in linux and try to find the output...expected output is 9but when first in ideone without \n in printf it showed 7 .. then with \n it showed 10... again with \n it showed 10 !!! .. whether its prob with compiler or fork's execution is differing i'm confused :( On Sep 22, 1:34 am, Rashmi Jain rashmi.jain...@gmail.com wrote: but in this output 10 times hello is printed..how..?? On Thu, Sep 22, 2011 at 1:52 AM, ravi maggon maggonr...@gmail.com wrote: This is the output I am getting - result: Success time: 0s memory: 1720 kB returned value: 0 input: no output: HelloHelloHelloHelloHelloHelloHelloHelloHelloHello On Thu, Sep 22, 2011 at 1:40 AM, teja bala pawanjalsa.t...@gmail.comwrote: @ ravi but compile it onhttp://ideone.com/nkTVN it showing 45 hello plz do look at it... On Thu, Sep 22, 2011 at 12:59 AM, Rashmi Jain rashmi.jain...@gmail.comwrote: @ravi: thanks..!! On Thu, Sep 22, 2011 at 12:54 AM, ravi maggon maggonr...@gmail.comwrote: ohh sorry, I thought it was i=9. Yes only 9 times Hello will be printed. On Thu, Sep 22, 2011 at 12:52 AM, Rashmi Jain rashmi.jain...@gmail.com wrote: @ravi can u plz explain how 10 processes are created..? shouldn't it be 9..?? On Thu, Sep 22, 2011 at 12:23 AM, ravi maggon maggonr...@gmail.comwrote: Output Hello printed 10 times. Since form command spawns the process, so for every call their are two process created and since if process gets successfully created fork returns some positive no. which is the process id, so it will break the loop and finally only the 10 child processes will be left which will print Hello 10 times. I hope that I cleared your doubt. On Thu, Sep 22, 2011 at 12:03 AM, Anil Arya anilarya...@gmail.comwrote: http://ideone.com/nkTVN On Wed, Sep 21, 2011 at 11:43 PM, Saravana kumar saravana@gmail.com wrote: Hello will be printed 45 times... On Wed, Sep 21, 2011 at 7:57 PM, sush57 sushaant...@gmail.comwrote: main() { int tmp; for(i=0;i9;i++) { tmp=fork(); if(tmp0) break; printf(Hello); } } what's the output and how does this work can u give few other questions using fork... -- 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. -- *Anil Arya, Computer Science * *Motilal Nehru National Institute of Technology,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 Ravi Maggon B.E. CSE, Final Year Thapar University www.algorithmguru.com *Failure is the opportunity to begin again more intelligently* -- 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. -- Regards Ravi Maggon B.E. CSE, Final Year Thapar University www.algorithmguru.com *Failure is the opportunity to begin again more intelligently* -- 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
[algogeeks] Re: plz help
http://ideone.com/l5ek4 .. in this it had shown 6 http://ideone.com/Lj56O .. here 10 On Sep 22, 8:27 am, siva viknesh sivavikne...@gmail.com wrote: somebody try to execute in linux and try to find the output...expected output is 9but when first in ideone without \n in printf it showed 7 .. then with \n it showed 10... again with \n it showed 10 !!! .. whether its prob with compiler or fork's execution is differing i'm confused :( On Sep 22, 1:34 am, Rashmi Jain rashmi.jain...@gmail.com wrote: but in this output 10 times hello is printed..how..?? On Thu, Sep 22, 2011 at 1:52 AM, ravi maggon maggonr...@gmail.com wrote: This is the output I am getting - result: Success time: 0s memory: 1720 kB returned value: 0 input: no output: HelloHelloHelloHelloHelloHelloHelloHelloHelloHello On Thu, Sep 22, 2011 at 1:40 AM, teja bala pawanjalsa.t...@gmail.comwrote: @ ravi but compile it onhttp://ideone.com/nkTVN it showing 45 hello plz do look at it... On Thu, Sep 22, 2011 at 12:59 AM, Rashmi Jain rashmi.jain...@gmail.comwrote: @ravi: thanks..!! On Thu, Sep 22, 2011 at 12:54 AM, ravi maggon maggonr...@gmail.comwrote: ohh sorry, I thought it was i=9. Yes only 9 times Hello will be printed. On Thu, Sep 22, 2011 at 12:52 AM, Rashmi Jain rashmi.jain...@gmail.com wrote: @ravi can u plz explain how 10 processes are created..? shouldn't it be 9..?? On Thu, Sep 22, 2011 at 12:23 AM, ravi maggon maggonr...@gmail.comwrote: Output Hello printed 10 times. Since form command spawns the process, so for every call their are two process created and since if process gets successfully created fork returns some positive no. which is the process id, so it will break the loop and finally only the 10 child processes will be left which will print Hello 10 times. I hope that I cleared your doubt. On Thu, Sep 22, 2011 at 12:03 AM, Anil Arya anilarya...@gmail.comwrote: http://ideone.com/nkTVN On Wed, Sep 21, 2011 at 11:43 PM, Saravana kumar saravana@gmail.com wrote: Hello will be printed 45 times... On Wed, Sep 21, 2011 at 7:57 PM, sush57 sushaant...@gmail.comwrote: main() { int tmp; for(i=0;i9;i++) { tmp=fork(); if(tmp0) break; printf(Hello); } } what's the output and how does this work can u give few other questions using fork... -- 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. -- *Anil Arya, Computer Science * *Motilal Nehru National Institute of Technology,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 Ravi Maggon B.E. CSE, Final Year Thapar University www.algorithmguru.com *Failure is the opportunity to begin again more intelligently* -- 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. -- Regards Ravi Maggon B.E. CSE, Final Year Thapar University www.algorithmguru.com *Failure is the opportunity to begin again more intelligently* -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send
[algogeeks] Re: plz help
if anybody knows other good online compilers try to post ... codepad doesn't support fork On Sep 22, 8:29 am, siva viknesh sivavikne...@gmail.com wrote: http://ideone.com/l5ek4 .. in this it had shown 6 http://ideone.com/Lj56O .. here 10 On Sep 22, 8:27 am, siva viknesh sivavikne...@gmail.com wrote: somebody try to execute in linux and try to find the output...expected output is 9but when first in ideone without \n in printf it showed 7 .. then with \n it showed 10... again with \n it showed 10 !!! .. whether its prob with compiler or fork's execution is differing i'm confused :( On Sep 22, 1:34 am, Rashmi Jain rashmi.jain...@gmail.com wrote: but in this output 10 times hello is printed..how..?? On Thu, Sep 22, 2011 at 1:52 AM, ravi maggon maggonr...@gmail.com wrote: This is the output I am getting - result: Success time: 0s memory: 1720 kB returned value: 0 input: no output: HelloHelloHelloHelloHelloHelloHelloHelloHelloHello On Thu, Sep 22, 2011 at 1:40 AM, teja bala pawanjalsa.t...@gmail.comwrote: @ ravi but compile it onhttp://ideone.com/nkTVN it showing 45 hello plz do look at it... On Thu, Sep 22, 2011 at 12:59 AM, Rashmi Jain rashmi.jain...@gmail.comwrote: @ravi: thanks..!! On Thu, Sep 22, 2011 at 12:54 AM, ravi maggon maggonr...@gmail.comwrote: ohh sorry, I thought it was i=9. Yes only 9 times Hello will be printed. On Thu, Sep 22, 2011 at 12:52 AM, Rashmi Jain rashmi.jain...@gmail.com wrote: @ravi can u plz explain how 10 processes are created..? shouldn't it be 9..?? On Thu, Sep 22, 2011 at 12:23 AM, ravi maggon maggonr...@gmail.comwrote: Output Hello printed 10 times. Since form command spawns the process, so for every call their are two process created and since if process gets successfully created fork returns some positive no. which is the process id, so it will break the loop and finally only the 10 child processes will be left which will print Hello 10 times. I hope that I cleared your doubt. On Thu, Sep 22, 2011 at 12:03 AM, Anil Arya anilarya...@gmail.comwrote: http://ideone.com/nkTVN On Wed, Sep 21, 2011 at 11:43 PM, Saravana kumar saravana@gmail.com wrote: Hello will be printed 45 times... On Wed, Sep 21, 2011 at 7:57 PM, sush57 sushaant...@gmail.comwrote: main() { int tmp; for(i=0;i9;i++) { tmp=fork(); if(tmp0) break; printf(Hello); } } what's the output and how does this work can u give few other questions using fork... -- 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. -- *Anil Arya, Computer Science * *Motilal Nehru National Institute of Technology,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 Ravi Maggon B.E. CSE, Final Year Thapar University www.algorithmguru.com *Failure is the opportunity to begin again more intelligently* -- 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. -- Regards
[algogeeks] Re: plz help
expected op is 9 .. since on each iteration parent process gets cancelled out (its pid 0 ) and child process alone prints hello .. no chance of getting 10 or any other output .. correct me if m wrong ! On Sep 22, 8:31 am, siva viknesh sivavikne...@gmail.com wrote: if anybody knows other good online compilers try to post ... codepad doesn't support fork On Sep 22, 8:29 am, siva viknesh sivavikne...@gmail.com wrote: http://ideone.com/l5ek4 .. in this it had shown 6 http://ideone.com/Lj56O .. here 10 On Sep 22, 8:27 am, siva viknesh sivavikne...@gmail.com wrote: somebody try to execute in linux and try to find the output...expected output is 9but when first in ideone without \n in printf it showed 7 .. then with \n it showed 10... again with \n it showed 10 !!! .. whether its prob with compiler or fork's execution is differing i'm confused :( On Sep 22, 1:34 am, Rashmi Jain rashmi.jain...@gmail.com wrote: but in this output 10 times hello is printed..how..?? On Thu, Sep 22, 2011 at 1:52 AM, ravi maggon maggonr...@gmail.com wrote: This is the output I am getting - result: Success time: 0s memory: 1720 kB returned value: 0 input: no output: HelloHelloHelloHelloHelloHelloHelloHelloHelloHello On Thu, Sep 22, 2011 at 1:40 AM, teja bala pawanjalsa.t...@gmail.comwrote: @ ravi but compile it onhttp://ideone.com/nkTVN it showing 45 hello plz do look at it... On Thu, Sep 22, 2011 at 12:59 AM, Rashmi Jain rashmi.jain...@gmail.comwrote: @ravi: thanks..!! On Thu, Sep 22, 2011 at 12:54 AM, ravi maggon maggonr...@gmail.comwrote: ohh sorry, I thought it was i=9. Yes only 9 times Hello will be printed. On Thu, Sep 22, 2011 at 12:52 AM, Rashmi Jain rashmi.jain...@gmail.com wrote: @ravi can u plz explain how 10 processes are created..? shouldn't it be 9..?? On Thu, Sep 22, 2011 at 12:23 AM, ravi maggon maggonr...@gmail.comwrote: Output Hello printed 10 times. Since form command spawns the process, so for every call their are two process created and since if process gets successfully created fork returns some positive no. which is the process id, so it will break the loop and finally only the 10 child processes will be left which will print Hello 10 times. I hope that I cleared your doubt. On Thu, Sep 22, 2011 at 12:03 AM, Anil Arya anilarya...@gmail.comwrote: http://ideone.com/nkTVN On Wed, Sep 21, 2011 at 11:43 PM, Saravana kumar saravana@gmail.com wrote: Hello will be printed 45 times... On Wed, Sep 21, 2011 at 7:57 PM, sush57 sushaant...@gmail.comwrote: main() { int tmp; for(i=0;i9;i++) { tmp=fork(); if(tmp0) break; printf(Hello); } } what's the output and how does this work can u give few other questions using fork... -- 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. -- *Anil Arya, Computer Science * *Motilal Nehru National Institute of Technology,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 Ravi Maggon B.E. CSE, Final Year Thapar University www.algorithmguru.com *Failure is the opportunity to begin again more intelligently* -- 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
Re: [algogeeks] Re: plz help
I tried to run code on Mac Os and getting output as 9 times Hello. On Thu, Sep 22, 2011 at 9:19 AM, siva viknesh sivavikne...@gmail.comwrote: expected op is 9 .. since on each iteration parent process gets cancelled out (its pid 0 ) and child process alone prints hello .. no chance of getting 10 or any other output .. correct me if m wrong ! On Sep 22, 8:31 am, siva viknesh sivavikne...@gmail.com wrote: if anybody knows other good online compilers try to post ... codepad doesn't support fork On Sep 22, 8:29 am, siva viknesh sivavikne...@gmail.com wrote: http://ideone.com/l5ek4 .. in this it had shown 6 http://ideone.com/Lj56O .. here 10 On Sep 22, 8:27 am, siva viknesh sivavikne...@gmail.com wrote: somebody try to execute in linux and try to find the output...expected output is 9but when first in ideone without \n in printf it showed 7 .. then with \n it showed 10... again with \n it showed 10 !!! .. whether its prob with compiler or fork's execution is differing i'm confused :( On Sep 22, 1:34 am, Rashmi Jain rashmi.jain...@gmail.com wrote: but in this output 10 times hello is printed..how..?? On Thu, Sep 22, 2011 at 1:52 AM, ravi maggon maggonr...@gmail.com wrote: This is the output I am getting - result: Success time: 0smemory: 1720 kB returned value: 0 input: no output: HelloHelloHelloHelloHelloHelloHelloHelloHelloHello On Thu, Sep 22, 2011 at 1:40 AM, teja bala pawanjalsa.t...@gmail.comwrote: @ ravi but compile it onhttp://ideone.com/nkTVN it showing 45 hello plz do look at it... On Thu, Sep 22, 2011 at 12:59 AM, Rashmi Jain rashmi.jain...@gmail.comwrote: @ravi: thanks..!! On Thu, Sep 22, 2011 at 12:54 AM, ravi maggon maggonr...@gmail.comwrote: ohh sorry, I thought it was i=9. Yes only 9 times Hello will be printed. On Thu, Sep 22, 2011 at 12:52 AM, Rashmi Jain rashmi.jain...@gmail.com wrote: @ravi can u plz explain how 10 processes are created..? shouldn't it be 9..?? On Thu, Sep 22, 2011 at 12:23 AM, ravi maggon maggonr...@gmail.comwrote: Output Hello printed 10 times. Since form command spawns the process, so for every call their are two process created and since if process gets successfully created fork returns some positive no. which is the process id, so it will break the loop and finally only the 10 child processes will be left which will print Hello 10 times. I hope that I cleared your doubt. On Thu, Sep 22, 2011 at 12:03 AM, Anil Arya anilarya...@gmail.comwrote: http://ideone.com/nkTVN On Wed, Sep 21, 2011 at 11:43 PM, Saravana kumar saravana@gmail.com wrote: Hello will be printed 45 times... On Wed, Sep 21, 2011 at 7:57 PM, sush57 sushaant...@gmail.comwrote: main() { int tmp; for(i=0;i9;i++) { tmp=fork(); if(tmp0) break; printf(Hello); } } what's the output and how does this work can u give few other questions using fork... -- 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. -- *Anil Arya, Computer Science * *Motilal Nehru National Institute of Technology,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 Ravi Maggon B.E. CSE, Final Year Thapar University www.algorithmguru.com *Failure is the opportunity to begin again more intelligently* -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email
[algogeeks] Re: plz help for C output
@ abhinav u r right could you plz explain how? On Sep 10, 12:50 pm, abhinav gupta guptaabhinav...@gmail.com wrote: a) 100 On Sat, Sep 10, 2011 at 12:40 AM, abhishek abhishek.ma...@gmail.com wrote: (a) #define f(g,g2) g##g2 int main() { int var12=100; printf(%d,f(var,12)); getch(); } what will be the output?? (b) main() { int i=400,j-300; printf(%d...%d); } (c) void main() { char far *farther,* farthest ; printf(%d..%d,sizeof(father),sizeof(farthest)); } -- 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. -- @ |3 # ! /\/ @ \./ -- 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] Re: plz help for C output
@ parag u r right could u explain how?? On Sep 10, 12:51 pm, parag khanna khanna.para...@gmail.com wrote: 1. 100 2. 400...300 3. 4 .. 2 -- Parag Khanna B.tech Final Year NIT,Kurukshetra -- 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] Re: plz help
finally what's the answer On Sep 7, 5:36 pm, rahul vatsa vatsa.ra...@gmail.com wrote: again sry, its 1 oly :P On Wed, Sep 7, 2011 at 8:35 AM, rahul vatsa vatsa.ra...@gmail.com wrote: sry, wrongly i ve written 1 in 1st ln of my prev mail. its 25. On Wed, Sep 7, 2011 at 8:30 AM, rahul vatsa vatsa.ra...@gmail.com wrote: i think it should be 1. 5/2 paintings r made by 5/2 ppl in 5/2 days using 5/2 canvas = 1 painting is made by 1 person in 1 day using 1 canvas i.e. 1 guy cn make a painting in 1 day using a canvas. Now, the other case, to make 25 paintings using 25 canvases in 25 days. As there r 25 days total paintings required is 25, so u need just 1 guy to do that. u have here 25 canvases, bt he cn make using just 1. On Wed, Sep 7, 2011 at 8:15 AM, sush57 sushaant...@gmail.com wrote: If 5/2 artists make 5/2 paintings using 5/2 canvases in 5/2 days then how many artists r required to make 25 paintings using 25 canvases in 25 days? some sayin 25,some sayin 1...can anyone pls explain the answer for this puzzle... -- 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] Re: plz help
@Rahul: No, no, no. If you double the people and don't change the number of days, you double the number of paintings. Similarly, if you double the number of days and don't change the number of people, you double the number of paintings. The number of paintings is _jointly proportional_ to the number of people and the number of days. Thus, paintings = constant * people * days. We can use the given data to solve for the constant: 5/2 = c * 5/2 * 5/2, so c = 2/5. Finally, 25 = 2/5 * people * 25, so people = 5/2. Dave On Sep 7, 7:30 am, rahul vatsa vatsa.ra...@gmail.com wrote: i think it should be 1. 5/2 paintings r made by 5/2 ppl in 5/2 days using 5/2 canvas = 1 painting is made by 1 person in 1 day using 1 canvas i.e. 1 guy cn make a painting in 1 day using a canvas. Now, the other case, to make 25 paintings using 25 canvases in 25 days. As there r 25 days total paintings required is 25, so u need just 1 guy to do that. u have here 25 canvases, bt he cn make using just 1. On Wed, Sep 7, 2011 at 8:15 AM, sush57 sushaant...@gmail.com wrote: If 5/2 artists make 5/2 paintings using 5/2 canvases in 5/2 days then how many artists r required to make 25 paintings using 25 canvases in 25 days? some sayin 25,some sayin 1...can anyone pls explain the answer for this puzzle... -- 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.- Hide quoted text - - Show quoted text - -- 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: plz help
@sushanth, its 1. @dave, no of days no of paintings required are 25. And we need to find out how many ppl r required for this. obviously it will be 1 only. if there will be more than 1 guy, the work will be finished before 25 days. On Wed, Sep 7, 2011 at 9:11 AM, Dave dave_and_da...@juno.com wrote: @Rahul: No, no, no. If you double the people and don't change the number of days, you double the number of paintings. Similarly, if you double the number of days and don't change the number of people, you double the number of paintings. The number of paintings is _jointly proportional_ to the number of people and the number of days. Thus, paintings = constant * people * days. We can use the given data to solve for the constant: 5/2 = c * 5/2 * 5/2, so c = 2/5. Finally, 25 = 2/5 * people * 25, so people = 5/2. Dave On Sep 7, 7:30 am, rahul vatsa vatsa.ra...@gmail.com wrote: i think it should be 1. 5/2 paintings r made by 5/2 ppl in 5/2 days using 5/2 canvas = 1 painting is made by 1 person in 1 day using 1 canvas i.e. 1 guy cn make a painting in 1 day using a canvas. Now, the other case, to make 25 paintings using 25 canvases in 25 days. As there r 25 days total paintings required is 25, so u need just 1 guy to do that. u have here 25 canvases, bt he cn make using just 1. On Wed, Sep 7, 2011 at 8:15 AM, sush57 sushaant...@gmail.com wrote: If 5/2 artists make 5/2 paintings using 5/2 canvases in 5/2 days then how many artists r required to make 25 paintings using 25 canvases in 25 days? some sayin 25,some sayin 1...can anyone pls explain the answer for this puzzle... -- 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.- Hide quoted text - - Show quoted text - -- 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] Re: plz help
@Rahul: You are OBVIOUSLY wrong. Obviously. On Sep 7, 8:16 am, rahul vatsa vatsa.ra...@gmail.com wrote: @dave, no of days no of paintings required are 25. And we need to find out how many ppl r required for this. obviously it will be 1 only. if there will be more than 1 guy, the work will be finished before 25 days. -- 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] Re: plz help
Figure out the man days per painting: 5/2 artists working for 5/2 days is 25/4 man days. They produce 5/2 paintings, so that is 5/2 man days per painting. Thus to make 25 paintings will require 25*5/2 man days. To complete that work in 25 days will require 5/2 painters. Don On Sep 7, 7:15 am, sush57 sushaant...@gmail.com wrote: If 5/2 artists make 5/2 paintings using 5/2 canvases in 5/2 days then how many artists r required to make 25 paintings using 25 canvases in 25 days? some sayin 25,some sayin 1...can anyone pls explain the answer for this puzzle... -- 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: plz help
don u r rt :-) On Wed, Sep 7, 2011 at 10:00 AM, Don dondod...@gmail.com wrote: Figure out the man days per painting:5/2 artists working for 5/2 days is 25/4 man days. They produce 5/2 paintings, so that is 5/2 man days per painting. Thus to make 25 paintings will require 25*5/2 man days. To complete that work in 25 days will require 5/2 painters. Don On Sep 7, 7:15 am, sush57 sushaant...@gmail.com wrote: If 5/2 artists make 5/2 paintings using 5/2 canvases in 5/2 days then how many artists r required to make 25 paintings using 25 canvases in 25 days? some sayin 25,some sayin 1...can anyone pls explain the answer for this puzzle... -- 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] Re: plz help
@Rahul: Wasn't I correct, too? Dave On Sep 7, 9:07 am, rahul vatsa vatsa.ra...@gmail.com wrote: don u r rt :-) On Wed, Sep 7, 2011 at 10:00 AM, Don dondod...@gmail.com wrote: Figure out the man days per painting:5/2 artists working for 5/2 days is 25/4 man days. They produce 5/2 paintings, so that is 5/2 man days per painting. Thus to make 25 paintings will require 25*5/2 man days. To complete that work in 25 days will require 5/2 painters. Don On Sep 7, 7:15 am, sush57 sushaant...@gmail.com wrote: If 5/2 artists make 5/2 paintings using 5/2 canvases in 5/2 days then how many artists r required to make 25 paintings using 25 canvases in 25 days? some sayin 25,some sayin 1...can anyone pls explain the answer for this puzzle... -- 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.- Hide quoted text - - Show quoted text - -- 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: plz help
ya dave u r also correct :-) On Wed, Sep 7, 2011 at 10:21 AM, Dave dave_and_da...@juno.com wrote: @Rahul: Wasn't I correct, too? Dave On Sep 7, 9:07 am, rahul vatsa vatsa.ra...@gmail.com wrote: don u r rt :-) On Wed, Sep 7, 2011 at 10:00 AM, Don dondod...@gmail.com wrote: Figure out the man days per painting:5/2 artists working for 5/2 days is 25/4 man days. They produce 5/2 paintings, so that is 5/2 man days per painting. Thus to make 25 paintings will require 25*5/2 man days. To complete that work in 25 days will require 5/2 painters. Don On Sep 7, 7:15 am, sush57 sushaant...@gmail.com wrote: If 5/2 artists make 5/2 paintings using 5/2 canvases in 5/2 days then how many artists r required to make 25 paintings using 25 canvases in 25 days? some sayin 25,some sayin 1...can anyone pls explain the answer for this puzzle... -- 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.- Hide quoted text - - Show quoted text - -- 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] Re: plz help
i think u can ignore number of canvases here... artists and days are inversely proportional while artists and paintings are directly proportional. artistspaintingsdays - --- - 5/25/2 5/2 so, 1 5/2 25/4 1/45/2 25 so, for (5/2) * 10 paintings (25 paintings), u'll need 10 times more artists artistspaintingsdays - --- - (1/4)*10(5/2)*1025 which is 5/2 artists... On Sep 7, 5:15 am, sush57 sushaant...@gmail.com wrote: If 5/2 artists make 5/2 paintings using 5/2 canvases in 5/2 days then how many artists r required to make 25 paintings using 25 canvases in 25 days? some sayin 25,some sayin 1...can anyone pls explain the answer for this puzzle... -- 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: PLz help urgent
i also want to know buddy.. if u knw thn help me buddy On Thu, Aug 25, 2011 at 11:01 PM, vivek vivek.thapar2...@gmail.com wrote: hello buddy...hows u...american express also cuming to our campus,..have u got any info abt its technical written and apti written test that questions mainly comes from whch technical subject and whch portions of aptitude... pls help me buddy its very urgent.. -- 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/-/AZssvRAIlA8J. 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] Re: PLz help urgent
hello buddy...hows u...american express also cuming to our campus,..have u got any info abt its technical written and apti written test that questions mainly comes from whch technical subject and whch portions of aptitude... pls help me buddy its very urgent.. -- 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/-/AZssvRAIlA8J. 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] Re: plz help with this
Ya correct, I didnt see that. Now I got it. I added the condition s==e-1. Thanks a lot. On Aug 2, 3:12 pm, durgaprasad k durga...@gmail.com wrote: I think the code is running infinity times as there is no checking condition when to stop the calculation of max value. so before going to the max function there should be a checking till when you need to run the loop. Regards, Durga On Tue, Aug 2, 2011 at 2:30 PM, Gayathri Anandan gayathriananda...@gmail.com wrote: I didnt get any output for this pgm. I think its keep on running and got struck in the 6th line. Plz help with this. 1 #includestdio.h 2 #includeconio.h 3 int max(int a[10],int s,int e) 4 { 5 int res,res1,res2,mid=(s+e-1)/2; 6 res1=max(a,s,mid+1); 7 res2=max(a,mid+1,e); 8 res=res1res2?res1:res2; 9 return res; 10 } void main() { int a[]={2,4,1,2,3,8,7,6,9},maxval; maxval=max(a,0,9); printf(%d,maxval); getch(); } -- 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] Re: Plz help with multidimensional array
u can access arr[0],arr[1],arr[2] in following way ... #include stdio.h int main() { char name[3][10] = {jan,feb,march}; char (*p)[10] = name; int i; for(i=0;i=3;i++){ printf(%s\n,p); p = p+1; } return 0; } -- 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.