i think because of &operator the program is working differently... also
there is four data value print operation..


On Mon, Dec 9, 2013 at 2:34 AM, Tamanna Afroze <afroze...@gmail.com> wrote:

> I got some other outputs.. when line 6 isn't commented i got 3 1 2 3, i m
> using turbo c++ compiler..
>
>
> On Fri, Dec 6, 2013 at 8:17 AM, pawan yadav <pawan1991ya...@gmail.com>wrote:
>
>> Hi All,
>>
>> I'm not able to get output of following c program :
>>
>> #include<stdio.h>
>>  main()
>>  {
>>      int a[] ={ 1,2,3,4,5,6,7};
>>      char c[] = {'a','x','h','o','k'};
>>  //    printf("%u   %u\n", &a[3], &a[0]);                      line 6
>>      printf("%d %d %d %d \n", (&a[3]-&a[0]));
>>  }
>>
>> If line 6 is commented, output :
>>
>> 3 1562814827 1869117537 0
>>
>> Confusion : why is there 4 output?   "(&a[3]-&a[0])" should give only one.
>>
>> if line 6 is not commented, output :
>>
>> 1554221244   1554221232
>> 3 1554221232 1309214001 64
>>
>>
>>
>> Can anybody please explain why/how these outputs are coming?
>>
>> Thanks,
>> Pawan.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to algogeeks+unsubscr...@googlegroups.com.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to algogeeks+unsubscr...@googlegroups.com.

Reply via email to