int main(){printf("%s",printf("samsung")+fun());return 0;}fun(){return
"electronic";}




On Tue, Sep 13, 2011 at 11:28 PM, kumar raja <rajkumar.cs...@gmail.com>wrote:

> main(){printf("%s",printf("samsung")+fun());}fun(){return "electronic";}
>
> The printf is a function which returns the number of printed characters , and 
> scanf is a function
> which returns the number of inputs scanned .
>
> So after printing "samsung" it returns 7. fun() is returning a pointer to the 
> constant string
>
> "electronic" , so it is like 7["electronic"]
>
> so the %s prints that string from the 7th index onwards till end .
>
> So output is "nic"
>
> so the total output is "samsungnic"
>
> but i dont know why it is exiting with some error code..
>
>
>
> On 13 September 2011 10:51, Rajeshwar Patra <rajeshwarpa...@gmail.com>wrote:
>
>> http://codepad.org/erdnF74M
>>
>> can anyone explain the output ???
>>
>> --
>> *Rajeshwar Patra,*
>> *MCA final year,*
>> *Nit Durgapur*
>>
>>  --
>> 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.
>>
>
>
>
> --
> Regards
> Kumar Raja
> M.Tech(SIT)
> IIT Kharagpur,
> 10it60...@iitkgp.ac.in
> 7797137043.
> 09491690115.
>
>  --
> 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.
>



-- 
Kind Regards
Ishan Aggarwal
[image: Aricent Group]
Presidency Tower-A, M.G.Road,Sector-14
Gurgaon,Haryana.122015 INDIA
Phone : +91-9654602663
ishan2.aggar...@aricent.com <puneet.ar...@aricent.com>

-- 
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.

Reply via email to