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 <[email protected]>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 [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, [email protected] 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
