Re: [algogeeks] Explain the o/p

2011-06-29 Thread rajeev bharshetty
@ashwini singh Printf() returns the number of values printed to the output
so printf("%d %d",2,2) returns 3 and the second printf returns 4 so bitwise
and of 3 and 4 is 0 so i is 0  . further printf statements print the values
and the last two printf statements have 3 & 3 so answer is 3.

Regards

Rajeev N B

I Blog @ www.opensourcemania.co.cc

On Wed, Jun 29, 2011 at 8:31 PM, rajeev bharshetty wrote:

> @ashwini singh Printf() returns the number of values printed to the output
> so printf("%d %d",2,2) returns 3 and the second printf returns 4 so bitwise
> and of 3 and 4 is 0 so i is o . Similar explanation to further printf
> statements .
>
> Regards
>
> Rajeev N B
>
> I Blog @ www.opensourcemania.co.cc
>
>
> On Wed, Jun 29, 2011 at 8:10 PM, ashwini singh wrote:
>
>> please ex-plain the o/p of each line
>>
>> o/p is
>> 2 23 2
>> 0
>> 3
>> 2 2 2 23 2
>> 3
>>
>>
>> #include
>> #include
>>
>> main()
>> {
>>int i;
>>i=printf("%d %d",2,2) & printf("%d %d ",3,2);
>>printf("\n%d",i);
>>printf("\n%d\n",3,4);
>>printf("%d %d ",2,2);
>>printf("\n%d",printf("%d %d",2,2) & printf("%d %d",3,2));
>>getch();
>>
>>
>>   }
>>
>> --
>> with regards,
>> Ashwini kumar singh
>> ECE Final yr.
>> MNNIT Allahabad
>> *Mobile: *7505519402
>>
>>  --
>> 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] Explain the o/p

2011-06-29 Thread rajeev bharshetty
@ashwini singh Printf() returns the number of values printed to the output
so printf("%d %d",2,2) returns 3 and the second printf returns 4 so bitwise
and of 3 and 4 is 0 so i is o . Similar explanation to further printf
statements .

Regards

Rajeev N B

I Blog @ www.opensourcemania.co.cc

On Wed, Jun 29, 2011 at 8:10 PM, ashwini singh  wrote:

> please ex-plain the o/p of each line
>
> o/p is
> 2 23 2
> 0
> 3
> 2 2 2 23 2
> 3
>
>
> #include
> #include
>
> main()
> {
>int i;
>i=printf("%d %d",2,2) & printf("%d %d ",3,2);
>printf("\n%d",i);
>printf("\n%d\n",3,4);
>printf("%d %d ",2,2);
>printf("\n%d",printf("%d %d",2,2) & printf("%d %d",3,2));
>getch();
>
>
>   }
>
> --
> with regards,
> Ashwini kumar singh
> ECE Final yr.
> MNNIT Allahabad
> *Mobile: *7505519402
>
>  --
> 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.