Re: [algogeeks] Microsoft Interview Qn - Looping

2011-07-20 Thread naveen ms
yup...thank u:) -- You received this message because you are subscribed to the Google Groups Algorithm Geeks 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

Re: [algogeeks] Microsoft Interview Qn - Looping

2011-07-20 Thread Kamakshii Aggarwal
please some1 tell how to do part 2. On Wed, Jul 20, 2011 at 6:20 PM, kavitha nk kavithan...@gmail.com wrote: for 3rd v can replace decrement by an increment operator! //BE COOL// kavi -- You received this message because you are subscribed to the Google Groups Algorithm Geeks

[algogeeks] Microsoft Interview Qn - Looping

2011-07-19 Thread Reynald
Given the following program, MS will be printed, infinite number of times: int n = 20; int i; for (i=0; in; i--) printf(MS); Apply one of the following three operations one at a time such that MS can be printed 20 times. 1. You can add only one character into it. 2.

Re: [algogeeks] Microsoft Interview Qn - Looping

2011-07-19 Thread Radhika Renganathan
i know 3 solns! 1) int n = 20; int i; for (i=0; i+n; i--) printf(MS); 2) int n = 20; int i; for (i=0; in; n--) printf(MS); 3) int n = 20; int i; for (i=0; -in; i--) printf(MS); On Tue, Jul 19, 2011 at 10:27 PM, Reynald reynaldsus...@gmail.com wrote: Given the

Re: [algogeeks] Microsoft Interview Qn - Looping

2011-07-19 Thread hary rathor
n ; ~n -- You received this message because you are subscribed to the Google Groups Algorithm Geeks 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

Re: [algogeeks] Microsoft Interview Qn - Looping

2011-07-19 Thread Anisha Mazumder
how to solve part 2? On Tue, Jul 19, 2011 at 4:16 PM, hary rathor harry.rat...@gmail.com wrote: n ; ~n -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from

Re: [algogeeks] Microsoft Interview Qn - Looping

2011-07-19 Thread naveen ms
excuse me...can any explain y it goes to infinite loop.. with regards naveen -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to

Re: [algogeeks] Microsoft Interview Qn - Looping

2011-07-19 Thread oppilas .
Naveen indeed it's not infinite loop but it will print MS 2^31+1 times, right ? :) Change it so that it prints it 20 times. On Wed, Jul 20, 2011 at 7:39 AM, naveen ms naveenms...@gmail.com wrote: excuse me...can any explain y it goes to infinite loop.. with regards naveen -- You received