It's not about the compiler or anything, it is just that you are accessing the memory you have not allocated, so whatever is stored at that memory location gets displayed, it can be anything in your case these memory locations contains 0 so it displays 0. PS: Ideone is gcc 4.3.4
On Fri, Jul 29, 2011 at 2:25 AM, Rajeshwar Patra <[email protected]>wrote: > @nitish plz try out on gcc everytym it gives a 0 > > -- > 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. > -- 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.
