Re: [algogeeks] reason

2011-08-18 Thread Arun Vishwanathan
@programming love:I can understand what u say but my doubt is that for the first output which is 2, according to your example, p has address 10 which it points to.And as u say int * tends to dereference 2 bytes so that wud be now 10 and 11.finally char * takes only 1 byte so why is value at 11

Re: [algogeeks] reason

2011-08-16 Thread pacific :-)
I believe you are assuming little endian right ? On Mon, Aug 15, 2011 at 2:14 PM, programming love love.for.programm...@gmail.com wrote: The internal representation of array is this: suppose that the address starts from decimal number 10 and integer occupies 2 bytes 10- 0002 ( num 2 in

[algogeeks] reason

2011-08-15 Thread Nitin
#includestdio.h #define fun(arg) do\ {\ if(arg)\ printf(have fun...,\n);\ }while(i--) main() { int i=6; fun(i5); } give the answer and please give the reason for this #includestdio.h #define fun(a,b) a##b main() { int a, b, ab; a = 1, b = 2, ab

[algogeeks] reason

2011-08-15 Thread Nitin
#includestdio.h main() { int arr[3]={2,3,4}; char *p; p=arr; p=(char *)((int *)(p)); printf(%d,*p); p=(char *)((int *)(p+1)); printf(%d,*p); } it is giving 2,0 why it is giving 0 ..?? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to

Re: [algogeeks] reason

2011-08-15 Thread aditi garg
I think dis is bec int occupies 4 bytes while char occupies 1 byte so in the memory when we save as int dey are saved as 2000 3000 4000 now whn u take a char pointer pointing to dis array and u increment it by 1 dey will move only by 1 byte and thus u get 0... u can verify the result by removing

Re: [algogeeks] reason

2011-08-15 Thread Anil Arya
@nitin-- http://www.crazyengineers.com/forum/computer-science-engineering/43458-what-use-c-language.html On Mon, Aug 15, 2011 at 1:51 PM, hary rathor harry.rat...@gmail.com wrote: main() { int i=6; do { if(i5) printf(have fun...,\n);

Re: [algogeeks] reason

2011-08-15 Thread Dipankar Patro
I think while assignment the type conversion will take place. Whether you write it or not. check this out: http://ideone.com/y36vj ^^ Just giving off warnings, but it is working. On 15 August 2011 14:14, aditi garg aditi.garg.6...@gmail.com wrote: I think dis is bec int occupies 4 bytes while

Re: [algogeeks] reason

2011-08-15 Thread programming love
The internal representation of array is this: suppose that the address starts from decimal number 10 and integer occupies 2 bytes 10- 0002 ( num 2 in hex) 12- 0003 ( num 3 in hex) 14- 0004 ( num 4 in hex) Now p points to address 10 and is type char. (Even after type casts) p+1 will increment

[algogeeks] reason?????????

2011-08-01 Thread jagrati verma
#includestdio.h main() { short int i=0; for(i=5 i=-1;++i;i0) printf(%u\n,i); printf(\n); return 0; } o/p is 1. 4294967295 hw??? -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] reason?????????

2011-08-01 Thread vijay goswami
its an infinite loop On Tue, Aug 2, 2011 at 12:21 AM, jagrati verma jagrativermamn...@gmail.comwrote: #includestdio.h main() { short int i=0; for(i=5 i=-1;++i;i0) printf(%u\n,i); printf(\n); return 0; } o/p is 1.

Re: [algogeeks] reason?????????

2011-08-01 Thread jagrati verma
it is nt an infinite loop it ends at 4294967295 On Tue, Aug 2, 2011 at 12:53 AM, vijay goswami vjrockks...@gmail.comwrote: its an infinite loop On Tue, Aug 2, 2011 at 12:21 AM, jagrati verma jagrativermamn...@gmail.com wrote: #includestdio.h main() { short int i=0; for(i=5

Re: [algogeeks] reason?????????

2011-08-01 Thread Anika Jain
u save its output in a file and note nos. from 32676 to a large value 4294967295 are missing in this.. On Tue, Aug 2, 2011 at 12:59 AM, jagrati verma jagrativermamn...@gmail.comwrote: it is nt an infinite loop it ends at 4294967295 On Tue, Aug 2, 2011 at 12:53 AM, vijay goswami

[algogeeks] Reason for banning

2011-07-05 Thread Sanket
Hi, I was using a different ID for browsing and commenting on this group but since yesterday, I am getting a notification that the moderator has banned me from using this group. I wanted to know the reason why I was banned and whether this was in error because I don't remember doing anything

Re: [algogeeks] Reason for banning

2011-07-05 Thread shady
only reason why any of the moderators must have banned you is either for advertising kind of mails, or abusive mails, spamming.. I hope I get a reply to this instead of this ID also getting banned oh come on there must have been something that got you banned, anyway you are not banned