Re: [algogeeks] What would be the output for the following code fragment?
i=300 // binary = 0001 00101100 // in case of little Endien it will be saved like this :- 0001 00101100 //suppose int = 2 bytes and char = 1 byte char *ptr = i; // take care it *char *ptr* not *int* **ptr*so what will happen *ptr will be pointing to 00101100 *++ptr // now ptr is pointing to 0001 bcozz it is a char * hence it will be increment by 1 byte ptr=2 // now 0001 will be converted to 0010 so final value of i becomes 001000101100 = 556 now you can try for big endian On Thu, Jun 7, 2012 at 12:27 AM, g4ur4v gauravyadav1...@gmail.com wrote: main() { int i=300; char *ptr = i; *++ptr=2; printf(%d,i); } -- 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] What would be the output for the following code fragment?
A: 556 -- 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] What would be the output for the following code fragment?
Hahaha.. Xcellent question Dude.. People Who Know can easily explain.. So for who don't here it is.. It has nothing to do with Endianess Mr.Yogesh.. Actually the bit patter happens to be reside such that ob.ch[0] fills with all ones .. Now as we knw the sign bit concept , here compilers goes mad thinking that the first 1 of 8 consecutive 1's for 255 number as the Sign bit and does the required operation of transforming to equivalent positive integer which happen to be 1.. So as I said no endian here.. if u change the machine than U'll get other -1 .i.e. ch[1]=-1 and again ch[0]=0.. BR, Prem On Thu, Jun 7, 2012 at 11:14 AM, s yogeesh yogees...@gmail.com wrote: A: 556 -- 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] What would be the output for the following code fragment?
Sign bit. well i forgot abt that. Bro still nly 1 bit s taken for sign so nly 1 '1' s taken as determining sign to be negative. Still we have 7 1's in hand. Wat abt that ? -- 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] What would be the output for the following code fragment?
http://ideone.com/Zz7ET On Thu, Jun 7, 2012 at 12:27 AM, g4ur4v gauravyadav1...@gmail.com wrote: main() { int i=300; char *ptr = i; *++ptr=2; printf(%d,i); } -- 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. -- Abhishek Sharma Under-Graduate Student, PEC University of Technology -- 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] what will be the output
15 times On Sat, Aug 6, 2011 at 7:20 PM, abhishek abhishek.ma...@gmail.com wrote: int x=150 for(y=x;y0;y=(x(y-1)) printf(Hi, There); How many times hi there will be printed? -- 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] what will be the output
@kartik : can u explain hw it is coming? On Sat, Aug 6, 2011 at 8:33 PM, karthik loganathan karthik.algog...@gmail.com wrote: 15 times On Sat, Aug 6, 2011 at 7:20 PM, abhishek abhishek.ma...@gmail.com wrote: int x=150 for(y=x;y0;y=(x(y-1)) printf(Hi, There); How many times hi there will be printed? -- 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] what would be the output of following code??
2 On Sat, Jul 16, 2011 at 2:51 PM, shiv narayan narayan.shiv...@gmail.comwrote: Printf(“%d”,printf(“%d %d”,2,2) printf(“%d %d ”, 2, 2)); -- 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] what would be the output of following code??
what about this printf(\n%d,printf(%d %d,2,2)printf(%d%d ,2,2)); On Sat, Jul 16, 2011 at 3:04 PM, swetha rahul swetharahu...@gmail.comwrote: 2 On Sat, Jul 16, 2011 at 2:51 PM, shiv narayan narayan.shiv...@gmail.comwrote: Printf(“%d”,printf(“%d %d”,2,2) printf(“%d %d ”, 2, 2)); -- 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 Deoki Nandan Vishwakarma * * -- 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] what would be the output of following code??
Well if there is a space btween the two %d's dn it should be 2 2 2 23 Otherwise fine. On Sat, Jul 16, 2011 at 3:08 PM, Deoki Nandan deok...@gmail.com wrote: what about this printf(\n%d,printf(%d %d,2,2)printf(%d%d ,2,2)); On Sat, Jul 16, 2011 at 3:04 PM, swetha rahul swetharahu...@gmail.comwrote: 2 On Sat, Jul 16, 2011 at 2:51 PM, shiv narayan narayan.shiv...@gmail.comwrote: Printf(“%d”,printf(“%d %d”,2,2) printf(“%d %d ”, 2, 2)); -- 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 Deoki Nandan Vishwakarma * * -- 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.
Re: [algogeeks] what would be the output of following code??
answer for first should be 2 22 23 and for second 2 222 2 correct me if i am wrong. On Sat, Jul 16, 2011 at 3:08 PM, Deoki Nandan deok...@gmail.com wrote: what about this printf(\n%d,printf(%d %d,2,2)printf(%d%d ,2,2)); On Sat, Jul 16, 2011 at 3:04 PM, swetha rahul swetharahu...@gmail.comwrote: 2 On Sat, Jul 16, 2011 at 2:51 PM, shiv narayan narayan.shiv...@gmail.comwrote: Printf(“%d”,printf(“%d %d”,2,2) printf(“%d %d ”, 2, 2)); -- 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 Deoki Nandan Vishwakarma * * -- 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] what would be the output of following code??
@ankur that's right :) On Sat, Jul 16, 2011 at 3:25 PM, Ankur Khurana ankur.kkhur...@gmail.comwrote: answer for first should be 2 22 23 and for second 2 222 2 correct me if i am wrong. On Sat, Jul 16, 2011 at 3:08 PM, Deoki Nandan deok...@gmail.com wrote: what about this printf(\n%d,printf(%d %d,2,2)printf(%d%d ,2,2)); On Sat, Jul 16, 2011 at 3:04 PM, swetha rahul swetharahu...@gmail.comwrote: 2 On Sat, Jul 16, 2011 at 2:51 PM, shiv narayan narayan.shiv...@gmail.com wrote: Printf(“%d”,printf(“%d %d”,2,2) printf(“%d %d ”, 2, 2)); -- 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 Deoki Nandan Vishwakarma * * -- 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] what would be the output of following code??
the ans to first should be 2 2 2 2 0. and the and to second should be. 222 2 2 please correct me if i am wrong. On Sat, Jul 16, 2011 at 4:57 PM, shady sinv...@gmail.com wrote: @ankur that's right :) On Sat, Jul 16, 2011 at 3:25 PM, Ankur Khurana ankur.kkhur...@gmail.comwrote: answer for first should be 2 22 23 and for second 2 222 2 correct me if i am wrong. On Sat, Jul 16, 2011 at 3:08 PM, Deoki Nandan deok...@gmail.com wrote: what about this printf(\n%d,printf(%d %d,2,2)printf(%d%d ,2,2)); On Sat, Jul 16, 2011 at 3:04 PM, swetha rahul swetharahu...@gmail.comwrote: 2 On Sat, Jul 16, 2011 at 2:51 PM, shiv narayan narayan.shiv...@gmail.com wrote: Printf(“%d”,printf(“%d %d”,2,2) printf(“%d %d ”, 2, 2)); -- 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 Deoki Nandan Vishwakarma * * -- 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. -- Varun Pahwa B.Tech (IT) 7th Sem. Indian Institute of Information Technology Allahabad. Ph : 09793899112 Official Email :: rit2008...@iiita.ac.in Another Email :: varunpahwa.ii...@gmail.com People who fail to plan are those who plan to fail. -- 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] what would be the output of following code??
please ignore my previous post. On Sat, Jul 16, 2011 at 5:38 PM, varun pahwa varunpahwa2...@gmail.comwrote: the ans to first should be 2 2 2 2 0. and the and to second should be. 222 2 2 please correct me if i am wrong. On Sat, Jul 16, 2011 at 4:57 PM, shady sinv...@gmail.com wrote: @ankur that's right :) On Sat, Jul 16, 2011 at 3:25 PM, Ankur Khurana ankur.kkhur...@gmail.comwrote: answer for first should be 2 22 23 and for second 2 222 2 correct me if i am wrong. On Sat, Jul 16, 2011 at 3:08 PM, Deoki Nandan deok...@gmail.com wrote: what about this printf(\n%d,printf(%d %d,2,2)printf(%d%d ,2,2)); On Sat, Jul 16, 2011 at 3:04 PM, swetha rahul swetharahu...@gmail.comwrote: 2 On Sat, Jul 16, 2011 at 2:51 PM, shiv narayan narayan.shiv...@gmail.com wrote: Printf(“%d”,printf(“%d %d”,2,2) printf(“%d %d ”, 2, 2)); -- 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 Deoki Nandan Vishwakarma * * -- 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. -- Varun Pahwa B.Tech (IT) 7th Sem. Indian Institute of Information Technology Allahabad. Ph : 09793899112 Official Email :: rit2008...@iiita.ac.in Another Email :: varunpahwa.ii...@gmail.com People who fail to plan are those who plan to fail. -- Varun Pahwa B.Tech (IT) 7th Sem. Indian Institute of Information Technology Allahabad. Ph : 09793899112 Official Email :: rit2008...@iiita.ac.in Another Email :: varunpahwa.ii...@gmail.com People who fail to plan are those who plan to fail. -- 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] what would be the output of following code??
ignore my previous result. the ans to first should be 2 22 2 0. and the ans to second should be. 2 222 2 please correct me if i am wrong. On Sat, Jul 16, 2011 at 5:38 PM, varun pahwa varunpahwa2...@gmail.comwrote: the ans to first should be 2 2 2 2 0. and the and to second should be. 222 2 2 please correct me if i am wrong. On Sat, Jul 16, 2011 at 4:57 PM, shady sinv...@gmail.com wrote: @ankur that's right :) On Sat, Jul 16, 2011 at 3:25 PM, Ankur Khurana ankur.kkhur...@gmail.comwrote: answer for first should be 2 22 23 and for second 2 222 2 correct me if i am wrong. On Sat, Jul 16, 2011 at 3:08 PM, Deoki Nandan deok...@gmail.com wrote: what about this printf(\n%d,printf(%d %d,2,2)printf(%d%d ,2,2)); On Sat, Jul 16, 2011 at 3:04 PM, swetha rahul swetharahu...@gmail.comwrote: 2 On Sat, Jul 16, 2011 at 2:51 PM, shiv narayan narayan.shiv...@gmail.com wrote: Printf(“%d”,printf(“%d %d”,2,2) printf(“%d %d ”, 2, 2)); -- 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 Deoki Nandan Vishwakarma * * -- 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. -- Varun Pahwa B.Tech (IT) 7th Sem. Indian Institute of Information Technology Allahabad. Ph : 09793899112 Official Email :: rit2008...@iiita.ac.in Another Email :: varunpahwa.ii...@gmail.com People who fail to plan are those who plan to fail. -- Varun Pahwa B.Tech (IT) 7th Sem. Indian Institute of Information Technology Allahabad. Ph : 09793899112 Official Email :: rit2008...@iiita.ac.in Another Email :: varunpahwa.ii...@gmail.com People who fail to plan are those who plan to fail. -- 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] what would be the output of following code??
answer to the first should be 2 22 23 On Sat, Jul 16, 2011 at 5:44 PM, varun pahwa varunpahwa2...@gmail.comwrote: ignore my previous result. the ans to first should be 2 22 2 0. and the ans to second should be. 2 222 2 please correct me if i am wrong. On Sat, Jul 16, 2011 at 5:38 PM, varun pahwa varunpahwa2...@gmail.comwrote: the ans to first should be 2 2 2 2 0. and the and to second should be. 222 2 2 please correct me if i am wrong. On Sat, Jul 16, 2011 at 4:57 PM, shady sinv...@gmail.com wrote: @ankur that's right :) On Sat, Jul 16, 2011 at 3:25 PM, Ankur Khurana ankur.kkhur...@gmail.com wrote: answer for first should be 2 22 23 and for second 2 222 2 correct me if i am wrong. On Sat, Jul 16, 2011 at 3:08 PM, Deoki Nandan deok...@gmail.comwrote: what about this printf(\n%d,printf(%d %d,2,2)printf(%d%d ,2,2)); On Sat, Jul 16, 2011 at 3:04 PM, swetha rahul swetharahu...@gmail.com wrote: 2 On Sat, Jul 16, 2011 at 2:51 PM, shiv narayan narayan.shiv...@gmail.com wrote: Printf(“%d”,printf(“%d %d”,2,2) printf(“%d %d ”, 2, 2)); -- 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 Deoki Nandan Vishwakarma * * -- 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. -- Varun Pahwa B.Tech (IT) 7th Sem. Indian Institute of Information Technology Allahabad. Ph : 09793899112 Official Email :: rit2008...@iiita.ac.in Another Email :: varunpahwa.ii...@gmail.com People who fail to plan are those who plan to fail. -- Varun Pahwa B.Tech (IT) 7th Sem. Indian Institute of Information Technology Allahabad. Ph : 09793899112 Official Email :: rit2008...@iiita.ac.in Another Email :: varunpahwa.ii...@gmail.com People who fail to plan are those who plan to fail. -- 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.
Re: [algogeeks] what would be the output of following code??
Give reason not answer . Answer can be found by compiler On Sun, Jul 17, 2011 at 12:38 AM, Kamakshii Aggarwal kamakshi...@gmail.comwrote: answer to the first should be 2 22 23 On Sat, Jul 16, 2011 at 5:44 PM, varun pahwa varunpahwa2...@gmail.comwrote: ignore my previous result. the ans to first should be 2 22 2 0. and the ans to second should be. 2 222 2 please correct me if i am wrong. On Sat, Jul 16, 2011 at 5:38 PM, varun pahwa varunpahwa2...@gmail.comwrote: the ans to first should be 2 2 2 2 0. and the and to second should be. 222 2 2 please correct me if i am wrong. On Sat, Jul 16, 2011 at 4:57 PM, shady sinv...@gmail.com wrote: @ankur that's right :) On Sat, Jul 16, 2011 at 3:25 PM, Ankur Khurana ankur.kkhur...@gmail.com wrote: answer for first should be 2 22 23 and for second 2 222 2 correct me if i am wrong. On Sat, Jul 16, 2011 at 3:08 PM, Deoki Nandan deok...@gmail.comwrote: what about this printf(\n%d,printf(%d %d,2,2)printf(%d%d ,2,2)); On Sat, Jul 16, 2011 at 3:04 PM, swetha rahul swetharahu...@gmail.com wrote: 2 On Sat, Jul 16, 2011 at 2:51 PM, shiv narayan narayan.shiv...@gmail.com wrote: Printf(“%d”,printf(“%d %d”,2,2) printf(“%d %d ”, 2, 2)); -- 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 Deoki Nandan Vishwakarma * * -- 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. -- Varun Pahwa B.Tech (IT) 7th Sem. Indian Institute of Information Technology Allahabad. Ph : 09793899112 Official Email :: rit2008...@iiita.ac.in Another Email :: varunpahwa.ii...@gmail.com People who fail to plan are those who plan to fail. -- Varun Pahwa B.Tech (IT) 7th Sem. Indian Institute of Information Technology Allahabad. Ph : 09793899112 Official Email :: rit2008...@iiita.ac.in Another Email :: varunpahwa.ii...@gmail.com People who fail to plan are those who plan to fail. -- 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. -- **With Regards Deoki Nandan Vishwakarma * * -- 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] what would be the output of following code??
printf returns no of characters printed..first of all the rightmost printf will print 2 2 .and since it is printing 3 characters(two 2's and 1 space) thereby its returning 3.same is with the other printf..now the outer most printf will print the value of(3 3) which is 3..and hence the answer. On Sun, Jul 17, 2011 at 12:46 AM, Deoki Nandan deok...@gmail.com wrote: Give reason not answer . Answer can be found by compiler On Sun, Jul 17, 2011 at 12:38 AM, Kamakshii Aggarwal kamakshi...@gmail.com wrote: answer to the first should be 2 22 23 On Sat, Jul 16, 2011 at 5:44 PM, varun pahwa varunpahwa2...@gmail.comwrote: ignore my previous result. the ans to first should be 2 22 2 0. and the ans to second should be. 2 222 2 please correct me if i am wrong. On Sat, Jul 16, 2011 at 5:38 PM, varun pahwa varunpahwa2...@gmail.comwrote: the ans to first should be 2 2 2 2 0. and the and to second should be. 222 2 2 please correct me if i am wrong. On Sat, Jul 16, 2011 at 4:57 PM, shady sinv...@gmail.com wrote: @ankur that's right :) On Sat, Jul 16, 2011 at 3:25 PM, Ankur Khurana ankur.kkhur...@gmail.com wrote: answer for first should be 2 22 23 and for second 2 222 2 correct me if i am wrong. On Sat, Jul 16, 2011 at 3:08 PM, Deoki Nandan deok...@gmail.comwrote: what about this printf(\n%d,printf(%d %d,2,2)printf(%d%d ,2,2)); On Sat, Jul 16, 2011 at 3:04 PM, swetha rahul swetharahu...@gmail.com wrote: 2 On Sat, Jul 16, 2011 at 2:51 PM, shiv narayan narayan.shiv...@gmail.com wrote: Printf(“%d”,printf(“%d %d”,2,2) printf(“%d %d ”, 2, 2)); -- 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 Deoki Nandan Vishwakarma * * -- 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. -- Varun Pahwa B.Tech (IT) 7th Sem. Indian Institute of Information Technology Allahabad. Ph : 09793899112 Official Email :: rit2008...@iiita.ac.in Another Email :: varunpahwa.ii...@gmail.com People who fail to plan are those who plan to fail. -- Varun Pahwa B.Tech (IT) 7th Sem. Indian Institute of Information Technology Allahabad. Ph : 09793899112 Official Email :: rit2008...@iiita.ac.in Another Email :: varunpahwa.ii...@gmail.com People who fail to plan are those who plan to fail. -- 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. -- **With Regards Deoki Nandan Vishwakarma * * -- 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.
Re: [algogeeks] what will be the output
8, 32, 96 On Sat, Feb 5, 2011 at 2:46 PM, priya mehta priya.mehta...@gmail.comwrote: #include stdio.h #define PrintInt(expr) printf(%s : %d\n,#expr,(expr)) *int* FiveTimes(*int* a) { *int* t; t *=* a**2 *+* a; *return* t; } *int* main() { *int* a *=* 1, b *=* 2,c *=* 3; PrintInt(FiveTimes(a)); PrintInt(FiveTimes(b)); PrintInt(FiveTimes(c)); *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 algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@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] what will be the output
because u not thinking of operator precedence :P :P On Sat, Feb 5, 2011 at 2:52 PM, priya mehta priya.mehta...@gmail.comwrote: why is this happening? On Sat, Feb 5, 2011 at 2:51 PM, Manmeet Singh mans.aus...@gmail.comwrote: 8, 32, 96 On Sat, Feb 5, 2011 at 2:46 PM, priya mehta priya.mehta...@gmail.comwrote: #include stdio.h #define PrintInt(expr) printf(%s : %d\n,#expr,(expr)) *int* FiveTimes(*int* a) { *int* t; t *=* a**2 *+* a; *return* t; } *int* main() { *int* a *=* 1, b *=* 2,c *=* 3; PrintInt(FiveTimes(a)); PrintInt(FiveTimes(b)); PrintInt(FiveTimes(c)); *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 algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@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.comalgogeeks%2bunsubscr...@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.comalgogeeks%2bunsubscr...@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] what will be the output
@priya u seems to be a beginner in c programming... I would suggest u to go through Dennis richie. Thanks and regards, Gajendra Dadheech On Sat, Feb 5, 2011 at 2:53 PM, Manmeet Singh mans.aus...@gmail.com wrote: because u not thinking of operator precedence :P :P On Sat, Feb 5, 2011 at 2:52 PM, priya mehta priya.mehta...@gmail.comwrote: why is this happening? On Sat, Feb 5, 2011 at 2:51 PM, Manmeet Singh mans.aus...@gmail.comwrote: 8, 32, 96 On Sat, Feb 5, 2011 at 2:46 PM, priya mehta priya.mehta...@gmail.comwrote: #include stdio.h #define PrintInt(expr) printf(%s : %d\n,#expr,(expr)) *int* FiveTimes(*int* a) { *int* t; t *=* a**2 *+* a; *return* t; } *int* main() { *int* a *=* 1, b *=* 2,c *=* 3; PrintInt(FiveTimes(a)); PrintInt(FiveTimes(b)); PrintInt(FiveTimes(c)); *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 algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@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.comalgogeeks%2bunsubscr...@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.comalgogeeks%2bunsubscr...@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.comalgogeeks%2bunsubscr...@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] what will be the output
sure thanks:) On Sat, Feb 5, 2011 at 6:26 PM, Gajendra Dadheech gajju3...@gmail.comwrote: @priya u seems to be a beginner in c programming... I would suggest u to go through Dennis richie. Thanks and regards, Gajendra Dadheech On Sat, Feb 5, 2011 at 2:53 PM, Manmeet Singh mans.aus...@gmail.comwrote: because u not thinking of operator precedence :P :P On Sat, Feb 5, 2011 at 2:52 PM, priya mehta priya.mehta...@gmail.comwrote: why is this happening? On Sat, Feb 5, 2011 at 2:51 PM, Manmeet Singh mans.aus...@gmail.comwrote: 8, 32, 96 On Sat, Feb 5, 2011 at 2:46 PM, priya mehta priya.mehta...@gmail.comwrote: #include stdio.h #define PrintInt(expr) printf(%s : %d\n,#expr,(expr)) *int* FiveTimes(*int* a) { *int* t; t *=* a**2 *+* a; *return* t; } *int* main() { *int* a *=* 1, b *=* 2,c *=* 3; PrintInt(FiveTimes(a)); PrintInt(FiveTimes(b)); PrintInt(FiveTimes(c)); *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 algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@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.comalgogeeks%2bunsubscr...@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.comalgogeeks%2bunsubscr...@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.comalgogeeks%2bunsubscr...@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.comalgogeeks%2bunsubscr...@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] what will be the output
@priya Because precedence of + operator is greater than operator . So evaluation of expression a 2 + a will be a(a+2) On Sat, Feb 5, 2011 at 6:35 PM, priya mehta priya.mehta...@gmail.comwrote: sure thanks:) On Sat, Feb 5, 2011 at 6:26 PM, Gajendra Dadheech gajju3...@gmail.comwrote: @priya u seems to be a beginner in c programming... I would suggest u to go through Dennis richie. Thanks and regards, Gajendra Dadheech On Sat, Feb 5, 2011 at 2:53 PM, Manmeet Singh mans.aus...@gmail.comwrote: because u not thinking of operator precedence :P :P On Sat, Feb 5, 2011 at 2:52 PM, priya mehta priya.mehta...@gmail.comwrote: why is this happening? On Sat, Feb 5, 2011 at 2:51 PM, Manmeet Singh mans.aus...@gmail.comwrote: 8, 32, 96 On Sat, Feb 5, 2011 at 2:46 PM, priya mehta priya.mehta...@gmail.comwrote: #include stdio.h #define PrintInt(expr) printf(%s : %d\n,#expr,(expr)) *int* FiveTimes(*int* a) { *int* t; t *=* a**2 *+* a; *return* t; } *int* main() { *int* a *=* 1, b *=* 2,c *=* 3; PrintInt(FiveTimes(a)); PrintInt(FiveTimes(b)); PrintInt(FiveTimes(c)); *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 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.
Re: [algogeeks] what will be the output
12 and f(1,2) On Sat, Feb 5, 2011 at 12:46 AM, priya mehta priya.mehta...@gmail.comwrote: #include stdio.h #define f(a,b) a*##*b #define g(a) *#*a #define h(a) g(a) *int* main() { printf(%s\n,h(f(1,2))); printf(%s\n,g(f(1,2))); *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 algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@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] what will be the output
thats amazing :) :) but i wanted to know the explanation dear. On Sat, Feb 5, 2011 at 12:49 AM, rajat ahuja catch.rajatah...@gmail.comwrote: 12 and f(1,2) On Sat, Feb 5, 2011 at 12:46 AM, priya mehta priya.mehta...@gmail.comwrote: #include stdio.h #define f(a,b) a*##*b #define g(a) *#*a #define h(a) g(a) *int* main() { printf(%s\n,h(f(1,2))); printf(%s\n,g(f(1,2))); *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 algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@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.comalgogeeks%2bunsubscr...@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] what will be the output
ohk i try to xplain , first u understand abt two macros operator # operator makes string like #define g(a) *#*a WTEVER value of a will come ,this operator wil convert that into string noe 2nd operator is concatenation one like #define f(a,b) a*##*b here a and b wil get concatenated to form string but ths question test also the order of evalaution of fucntion like h(f(1,2)) first h macro wil get called and then it wil become g(f(1,2)) but now it wil call f(1,2) macro so tht makes g(12) n now g macro makes it 12 fr 2nd part g(f(1,2)) it calls g macro n converts it into string f(1,2) so here f macor wil nt get called as it has convereted into string :) cheers On Sat, Feb 5, 2011 at 12:50 AM, priya mehta priya.mehta...@gmail.comwrote: thats amazing :) :) but i wanted to know the explanation dear. On Sat, Feb 5, 2011 at 12:49 AM, rajat ahuja catch.rajatah...@gmail.comwrote: 12 and f(1,2) On Sat, Feb 5, 2011 at 12:46 AM, priya mehta priya.mehta...@gmail.comwrote: #include stdio.h #define f(a,b) a*##*b #define g(a) *#*a #define h(a) g(a) *int* main() { printf(%s\n,h(f(1,2))); printf(%s\n,g(f(1,2))); *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 algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@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.comalgogeeks%2bunsubscr...@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.comalgogeeks%2bunsubscr...@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] What would be the output of the following program..?
answer will be -1 because the statement in while loop will never executed as (+(+0)!=0) this will be evaluated as false because zero is not equal to zero and i is decremented in here but decrementation is postfix uses the value first and decrement it after sequence point which is the condition point of while loop and hence the answer is -1 On Mon, Dec 13, 2010 at 8:15 PM, siva viknesh sivavikne...@gmail.comwrote: int main() { int i=0; while(+(+i--)!=0) i-=i++; printf(%d\n,i); return 0; } (a) -1 (b) 1 (c) -65535 (d) 0 Ans is option 'a' .. but how?? anybody help plz? -- 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.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- SOURABH JAKHAR,(CSE)(3 year) ROOM NO 167 , TILAK,HOSTEL '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 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.