Re: [algogeeks] Re: microsoft paper that i wrote today..

2011-08-13 Thread Piyush Kapoor
Yeah,it will print some garbage string,as 4 has only one character and it is pointing to 4th character(1+2). As an example: int main(){printf http://www.opengroup.org/onlinepubs/009695399/functions/printf.html(1+2+I am good);return 0;} Gives output:: m good On Sat, Aug 13, 2011 at 2:59 PM,

[algogeeks] Re: microsoft paper that i wrote today..

2011-08-12 Thread gaurav kumar
thanks a lot mate . On Aug 11, 4:51 pm, sindhu sindhu...@gmail.com wrote: 1. write a method to find the smallest angle between two hands when the time is given as input??? 2. given a number between 1 to 1000 convert it to words..example 235..it should print as two hundred thirty five.. 3.

Re: [algogeeks] Re: microsoft paper that i wrote today..

2011-08-12 Thread aditi garg
wats the ans to the 5th ques?? On Fri, Aug 12, 2011 at 8:54 PM, gaurav kumar mailmea...@gmail.com wrote: thanks a lot mate . On Aug 11, 4:51 pm, sindhu sindhu...@gmail.com wrote: 1. write a method to find the smallest angle between two hands when the time is given as input??? 2. given

Re: [algogeeks] Re: microsoft paper that i wrote today..

2011-08-12 Thread sagar pareek
well if we write the code simply as #includestdio.h int main() { 1+2+4 } it gives compilation error if like this #includestdio.h int main() { 1+2+4; } it will give warning:- no effect of code if like this #includestdio.h int main() { int a= 1+2+4; printf(%d,a); } it will give

Re: [algogeeks] Re: microsoft paper that i wrote today..

2011-08-12 Thread Anil Arya
Q.5 . [warning] initialization makes integer from pointer without a cast. On Fri, Aug 12, 2011 at 10:56 PM, sagar pareek sagarpar...@gmail.comwrote: well if we write the code simply as #includestdio.h int main() { 1+2+4 } it gives compilation error if like this

Re: [algogeeks] Re: microsoft paper that i wrote today..

2011-08-12 Thread aditi garg
thanks:) On Fri, Aug 12, 2011 at 11:06 PM, Anil Arya anilarya...@gmail.com wrote: Q.5 . [warning] initialization makes integer from pointer without a cast. On Fri, Aug 12, 2011 at 10:56 PM, sagar pareek sagarpar...@gmail.comwrote: well if we write the code simply as

Re: [algogeeks] Re: microsoft paper that i wrote today..

2011-08-12 Thread siddharth srivastava
just wondering...is there a standard ans to Q3 ? On 12 August 2011 23:11, aditi garg aditi.garg.6...@gmail.com wrote: thanks:) On Fri, Aug 12, 2011 at 11:06 PM, Anil Arya anilarya...@gmail.com wrote: Q.5 . [warning] initialization makes integer from pointer without a cast. On

Re: [algogeeks] Re: microsoft paper that i wrote today..

2011-08-12 Thread Neeraj Gupta
Ques 5 might be value of 1+2+'4' https://ideone.com/8b91t Obviously if we use , then it represents string and we can't define + operation with other operand being an integer. On Fri, Aug 12, 2011 at 11:06 PM, Anil Arya anilarya...@gmail.com wrote: Q.5 . [warning] initialization makes

Re: [algogeeks] Re: microsoft paper that i wrote today..

2011-08-12 Thread Dipankar Patro
@ Neeraj: 1+2+'4' will be very simple to calculate: 3+48+4 = 55 But 1+2+4 is a good question. On 13 August 2011 06:10, Neeraj Gupta neeraj.gupta...@gmail.com wrote: Ques 5 might be value of 1+2+'4' https://ideone.com/8b91t Obviously if we use , then it represents string and we can't define